I'm doing a Line Chart using the HighCharts component in OS 10, and I need to add dataLabels to a specific dataPoint.
To do it, I'm iterating over a list and calling the DataPoint_Init to get the data point record. Then I'm doing some validations and according with that I'll show a dataLabel with a specific style. To do it, I'm creating an AdvancedDataPointFormat record, setting the AdvancedDataPointFormat.DataPoint and then the AdvancedDataPointFormat.DataPointJSON with the following value:
After this, I'm adding it to the AdvanceFormat.DataPointFormats structure and this structure is being passed in the chart block.
This is a mobile application, and for that reason, this logic is being called after fetch the data in the aggregate. The line chart is generated and I can see it, but for some reason the dataLabels don't show up. What am I missing?
Thank you all in advance,
Instead of doing the configuration on the DataPointJSON, try setting the parameter AdvancedFormat on the line chart block with the following value:
Does that work?
This will give you the same label for all points. From what I understand you need different labels for different points, so you'll need a formatter. If you can explain the rules for the different labels, I can try to give you an example.
Thank you for your answer and I'm so sorry for my late response. That solution was not suitable for me because I needed one label in the beginning and other in the end of the serie that worked as an overlay saying something like "I'm sorry you can't continue to scroll". So the solution I made was build the JSON by hand to do what I needed, since with OutSystems actions the code was not being generated and I didn't want to add a dummy serie just for this purpose.