Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Tiago Bernardo
Champion
1530
Views
3
Comments
[How to use OutSystems Charts Web] How to change color of the items in the Legend?
Question
Charts
Forge
How to use OutSystems Charts Web (O11)
Forge asset by
OutSystems Lab
Hi!
First of all, nice work!
I'm using a stacked chart. I'm able to define the colors in the data points for the columns, green for "Respondidos" and red for "Não respondidos".
But the Legend gets it's own automatica colors not corresponding to the values in the columns.
I've searched HighCharts API Reference and the examples in "Charts_HowTo" on how to customize the Legend in an advanced way but could not find anything. (The example that you give of using a stacked charts uses automatic colors).
Can you help?
Thanks!
Vera Tiago
Staff
Hi Tiago
You just need to add
colors: ['#008000', '#A52A2A'],
on
the same order as series
,
on json (AdvancedFormat).
Check this example and try to change the colors:
https://jsfiddle.net/ruus/aaLejbc7/
Let me know if any trouble doing this - I can help you.
Cheers,
Vera
Tiago Bernardo
Champion
Thank you for the reply.
I already had figure it out,
in a different form from your solution
. I wasn't fast enough to reply here.
I had to build a list of the structure "AdvancedDataSeriesFormat", with 2 elements, one for each series, with the attribute "DataSeriesJSON" like for example " color: '#008000' ".
Then pass that list to the action AdvancedFormat_Init() in the "DataSeriesFormats" parameter.
I was incorrectly trying to do the formating of the colors of the elements in the legend using the parameter "HighchartsJSON" of the action AdvancedFormat_Init().
Conwell Nkuna
Can't you add a colour by point functionality like we do on HighCharts?
This can help caters for more columns display....
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...