Skip to Content
0

Setting Pie Chart color dynamically

Apr 17 at 08:13 AM

14

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Christian Guenther
Apr 19 at 01:04 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded