Hello all,
Regarding the Outsystems Charts 3.1.0, what is the proper way to setup a data series as a secondary axis?
Hi @Sergio Santos,
Firstly I would like to thank you for all the context and images. This is an advance scenario and trick here is just to get the axisId.
So to do this you'll have to create an client action that you should trigger on the chart Initialized, inside let's have to advance configs (yAxis and Series):
1. Using the setHighchartsYAxisConfigs and yAxis widgetId, set the opposite attribute to the second axis:
2. Use a JS node to get the yAxis id:
3. Using the setHighchartsSeriesConfigs and the seriesName, set the yAxis reference to the second series:
Let me know if this unblocks you or if you need any further help.Best Regards,João Ferreira
Hello @Sergio Santos
Could you please provide more details about what you want to achieve?Any example from HighCharts you could relate to describe it?
Cheers,GM
Hi Gonçalo,
My requirement is simple, I have 3 data series and I want that one of them will be in the secondary axis (Y).
What is the proper way to specify the axis for that series?
Regards,
Sergio
Hi @Gonçalo Martins ,
this is an example on JSFiddle, I tried with 2 Y-axis styling addons added to the chart, but I don't understand how to do, it does show the 2 axis names, but only one set of tick labels. And one scale, which means the nuances of the series with smaller values is completely lost.
What is really needed, I think, correct me if I'm wrong @Sergio Santos , is 2 (or more) completely separate axis, linked to the series they are for, so each can choose it's own scale to best show the data in their connected series, and with their own tick marks showing their scale.
So in above example, the Belgian Beers y-axis is only a name, it should show ticks ranging maybe from 0 to 50, and the brown line should take up the whole height, thus visually showing the positive correlation between Belgian Beer Consumption and Creative Ideas generated by the Beatles.
I tried a bunch of things, amongst others, using SetHighchartsSeriesConfigs to set the path line/yAxis to 0 or 1, thus connecting the series to it's corresponding axis, as in the fiddle example, and when I execute it on the beer axis, it changes the ticks a little (taking steps of 250 instead of 200 for some reason), but nothing else improves.
I also tried adding min and max values to the beer axis, then suddenly the beer axis is shown with ticks, and with the datapoints nicely spread out vertically, but the ideas axis is cut off, not showing any datapoints or ticks anymore, although I had set its maxvalue to 1000.
Dorine
Adding to the above,
moving one of the axis to the other side is possible by setting path 'opposite' on that axis to True.
Just to you better understand what I want;
I have this:
And I want something like this:
Series A on the left Y axis and series B on the right Y axis.
How do I achieve this? Where do I set the axis to one specific data series?
Regards.
Hi @João Manuel Ferreira
Thank you very much for your explanation, however it's not working for me.
First of all I have a different parameter type regarding the SetHighchartsYAxisConfigs and also on the SetHighchartsSeriesConfigs.
They require a "text list" and in your example you are using a text on both.
Are we on the same "OutSystems Charts" version?
Second, even providing a "text list" parameter it still not working.
Maybe I missed something.
Best Regards,
Sérgio
Hi @Sergio Santos
You need to expand the structure under PropertyValueList to access all properties.
Hi @Gonçalo Martins,
My bad. It's expandable before any content on the property and I forgot that.
Nevertheless it still not working.
The Y Axis properties
The chart properties
The YAxisConfigs
The javaScript
The javaScript content
The SeriesConfigs
Please share an oml with your implementation. With screenshots is not efficient or easy to validate anything.
While creating a new OML to share, I found that is work exactly in the way explained by @João Manuel Ferreira .
It means I have something wrong on my original OML.
Thank you very much both of you.
Best regards,