Chart Colors

  
Hi, im using the bar chart and put the customize color in the bars, but the indicator data series name dont appear in the same color of the bars, 

The example attached show the bar in "yellow"  and the indicator in "blue"

Thanks
Andre,

You can check below two places to appear..

1) Just check whether your label property is assigned ot not? 
2) In the properties of Graph add a text whatever you want to display before Tooltip value.
Hope this will helps....

Regards,
Venkatesh 
Blue is the Highcharts default color for the first series, so if you have overridden the series/bar color to be yellow then you may also have to reset the legend color separately.  I don't see specifically how to change that as a setting in the Highcharts API (it shows background color and border color for the legend), but I believe the legend series line color is related to the 'point' color that controls the tooltip border, etc. 

If I want the tooltip and the series color to match I find that I have to set the 'series' color in the dataseries itself (using the 'color' field of the DataPoint structure) and make that the same as what I have set the series color to be using the AdvancedFormat property of the chart.  It's an extra step but it makes sure that the default color scheme in Highcharts is not used when customizing the series colors.

Hopefully that makes sense... if not then let me know and I can try to post more detail.

Best regards,
Steve
We are running into the same thing.  Using a bar chart yields incorrect legend colors.  If we use a pie chart, the legend colors are just fine. 



Any easy way to fix this?  The help in the above posts aren't enough to help us fix the problem.

Thanks.
Hi David,

Can you post the code for your chart, both the code in OutSystems and the generated javascript in the page would be very helpful.
Hi Andre - Not much to add.  Here is the SQL.

SELECT  {Task}.[Owner_Email], count(*), 'Task Ok', '', '#088A29'
from {Task}
where {Task}.[Owner_Email] IN (@EmailList) and {Task}.[Deadline] > sysdate
group by {Task}.[Owner_Email]
    Union
SELECT  {Task}.[Owner_Email], count(*), 'Task Overdue', '', '#8A0829'
from {Task}
where {Task}.[Owner_Email] IN (@EmailList) and {Task}.[Deadline] <= sysdate
group by {Task}.[Owner_Email]

We use DataPoint_Init using the values from query and then a ListAppend.  This list is then used by the bar chart.
Why don't you use DataPoint structure as the output of the Advanced Query? If that's what you have you don't need to use the DataPoint_Init action...
Andre, we do use the DataPoint as the output structure of the query.  I'll try remove the _Init and see what happens. 

-> I removed the _Init and code works great; legend is still not right.
Ok. Besides the DataPoint List what other information do you have on your chart. Can you paste here the generated javascript?
Andre, is this what you need?

Is there a solution yet? I'm having the same problem 


You are setting your colors on the point level instead of the series level.

This leaves the series colors as the Highcharts default colors despite your column being the color you wanted.

The series color is what determines the legend icon color.

-> http://jsfiddle.net/jlbriggs/8xo2jayg/

-> http://api.highcharts.com/highcharts/plotOptions.series.color

Hey J.

But is it possible to manage that color using some outsystems attribute? The DataPoint_Init action allows me to choose the color for a certain point, I got that now, but how do I manage the series color then?

Thanks

Hiya,


using the advancedFormatInit.

add per series an record to the advancedseries_format.

simply do

name : your series name

seriesJSON: "{color: #ffd900}"

see attached oml for the example


J. wrote:

Hiya,


using the advancedFormatInit.

add per series an record to the advancedseries_format.

simply do

name : your series name

seriesJSON: "{color: #ffd900}"

see attached oml for the example


That worked! Thanks a lot J.!


@mariap, could you mark J's answer as the Solution? Thanks!

Kilian Hekhuis wrote:

@mariap, could you mark J's answer as the Solution? Thanks!

Kilian, I can't, I am not the "owner" of the original post


Ok, appologies, I didn't check that. My bad.