cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Pie Chart color dynamically

Former Member
0 Kudos

Hi All,

I am using FPM_CHART_UIBB component to design a pie chart with 3 different colors. I used the color palette settings under the "plot area" section of "general settings", where I have provided fixed color in the format ["#FF0000","#FFFF00","#00FF00"]. This works fine. However my requirement is to render the chart color dynamically where the color code will be decided at run-time instead of fixing them during design time. How can I achieve this.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member193369
Active Participant
0 Kudos

You can manipulate the chart configuration dynamically at run time via the settings object IO_CHART_SETTINGS which is passed ti the chart's feeder GET_DATA method.

Somethin like

   io_settings->SET_CHART_SETTING( iv_property_name = 'plotArea.colorPalette' iv_value = '["#FF0000","#FFFF00","#00FF00"]' ).

should do the trick.

Best regards,

Christian