Jump to content

A couple of questions about UniChart


Lena

Recommended Posts

Hi.

I have one series.

1.How I can change the color of this series?

2.Can I change the color at the points of the series?
For example temperature series. If the temperature is above 50 degrees is the point of the red, the other green. Is it possible?

Thank you.

Link to comment
Share on other sites

Hi Lena!

If I understand correctly ..

Try (but it is for the particular case, may help for further analysis..):

 

post-906-0-93126200-1428310536_thumb.png

post-906-0-54640100-1428310568_thumb.png

function chart.beforerender(sender, eOpts)
{   
  sender.series.items[0].renderer = function (sprite, record, attributes, index, store) {
   if (record) {
     if (record.data.B > 50) {
       attributes.fill = '#ff0000'; //red
     } else if (record.data.B <= 50) {
       attributes.fill = '#00ff00'; //green
     } //else {
     //  attributes.fill = '#0000ff';
     //}
   }
   return attributes;
  }
}

Best regards!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...