Ynamically implement custom palette based on dataSet?

Posted by: junghoon.kim on 19 July 2021, 7:53 pm EST

    • Post Options:
    • Link

    Posted 19 July 2021, 7:53 pm EST - Updated 3 October 2022, 8:11 am EST

    When designing report chart in ActiveReportJs Designer

    I want to color the chart with the color I want with using hex color list in dataSet.

    Currently, I received the hex color value list in dataSet.

    like ([{map=#ffb240}, {map=#a8d277}, {map=#59b0f6}, …])

    Is there a way to dynamically implement the chart color on custom palette based on the color value of the dataSet?

  • Posted 19 July 2021, 7:55 pm EST

    The Post Name => How to dynamically implement custom palette based on dataSet?

  • Posted 26 July 2021, 6:26 am EST

    Hello,

    A color value in the chart palette could be an expression that evaluates at runtime, so this functionality is supported.

  • Posted 26 July 2021, 8:56 pm EST

    Thanks for reply.

    how can i evaluates list values using expression?

    when i using that list at expression, it only evaluates first list value…

    list : ([{color=#ff0000}, {color=#00ff00}, {color=#0000ff}, …])

    like below image

  • Posted 26 July 2021, 8:59 pm EST - Updated 3 October 2022, 8:11 am EST

    It has to be red, blue, and green color…

    but only colored #ff0000 value in this image

  • Posted 26 July 2021, 9:01 pm EST - Updated 3 October 2022, 8:11 am EST

  • Posted 27 July 2021, 5:35 am EST

    I see, so you have a separate dataset including color values and you want to map it to a chart palette color.

    There is no built-in functionality that would allow achieving that because a chart palette must contain multiple values, one per color.

    The only workaround I can suggest is to modify a report template programmatically by pulling the color values and setting them for the chart color palette.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels