28
Views
3
Comments
Solved
[OutSystems Charts] Charts V1 changing series colour on select is no longer working
outsystems-charts
Reactive icon
Forge component by Gonçalo Martins
Application Type
Reactive

Hello, 


I have just realised some functionality no longer works. I'm not entirely sure which version of OutSystems Charts caused the issue.


Basically I have a bar chart, and when a "bar" is selected I want it to change colour. 

This used to work by using some HighchartsJSON: 

I have the "Clickable" parameter set to true, and I know that works as the logic from the BarChart_v1OnClick is run. 

Ive attached an .oml which replicates the issue. 

I also created something similar in Highcharts to demonstrate what I expect to happen:

https://jsfiddle.net/6fw2yLj7/


Thanks

Chris


TestJob.oml
Solution

Hi @Christopher Robin-Kennedy ,

I'm analyzing this use case and I think I have found a way to unblock you. 

You should add your plotOptions in HighchartsJSON like so:

"plotOptions: {  bar: {  allowPointSelect: true },  series: { states: {  select: { color: '#ff0000' } } }}"


I think this will solve your use case. The problem here was just a matter of hierarchy, by default, our implementation configures the bar.allowPointSelect as false, and to override it you need to change the value of this property since plotOptions.bar will always be stronger than plotOptions.series.

You can configure the states.color on any of the plotOptions, bar, or series, it should work. 

Furthermore, the clickable value and action are not needed for this use case.

Since this is not a blocker and we can not prevent the impact of changing the plotOptions builder on V1 we will not change that bar.allowPointSelect default value.


Let me know if this unblocks you and if you need anything else just reach us.

Best Regards,
João Ferreira

Thank you João,


I can confirm this works:

Hi Christopher,


I'm sorry that you have found some issues with the OutSystems Charts. I can confirm this is indeed an issue on our side. I create da task on backlog to tackle this, should be available on a future release (task Id ROU-4562).

Thank you for the report!


Best regards,

Bernardo Cardoso

Solution

Hi @Christopher Robin-Kennedy ,

I'm analyzing this use case and I think I have found a way to unblock you. 

You should add your plotOptions in HighchartsJSON like so:

"plotOptions: {  bar: {  allowPointSelect: true },  series: { states: {  select: { color: '#ff0000' } } }}"


I think this will solve your use case. The problem here was just a matter of hierarchy, by default, our implementation configures the bar.allowPointSelect as false, and to override it you need to change the value of this property since plotOptions.bar will always be stronger than plotOptions.series.

You can configure the states.color on any of the plotOptions, bar, or series, it should work. 

Furthermore, the clickable value and action are not needed for this use case.

Since this is not a blocker and we can not prevent the impact of changing the plotOptions builder on V1 we will not change that bar.allowPointSelect default value.


Let me know if this unblocks you and if you need anything else just reach us.

Best Regards,
João Ferreira

Thank you João,


I can confirm this works:

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.