ItemFormatter is not working for legend in the FlexChart

Posted by: yifan_zhang on 14 September 2017, 12:07 pm EST

    • Post Options:
    • Link

    Posted 14 September 2017, 12:07 pm EST

    Hi, I found itemFormatter is pretty useful to customize the series symbol, however I can not use it to customize any other UI in the Chart such as the legend. Is this a known issue? If so, how can I customize the legend in a similar manner? Thanks.

  • Posted 14 September 2017, 12:07 pm EST

    Hi,

    We are working on your query and we will update you soon.

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 12:07 pm EST

    Hi,

    Currently, itemFormatter can be used only for SeriesSymbols. You can customize other UI element using CSS and javascript.

    We have created an issue related to this for further investigation with tracking id 270489. We will let you know as soon as we get any update on this issue.

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 12:07 pm EST

    Hello,

    itemFormatter only supports SeriesSymobols. If you would like to format legend, the legend only supports setting text which can be set by series.name.

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 12:07 pm EST

    Thanks for the reply. But what about the icons of series in the legend? How can I customize it to be some different shape or with different border? Thank you

  • Posted 14 September 2017, 12:07 pm EST

    Hello,

    You can change border style of legend using JS and CSS. By default, FlexChart provides different shape for different chart types. Please refer to the Theming section of the demo for the different theme.

    http://demos.wijmo.com/5/purejs/flexchartintro/flexchartintro/

    Thanks,

    Manish Kumar Gupta

  • Posted 24 September 2018, 9:06 am EST

    It would be useful if the legend template can be customised. For series displayed as Line the color is difficult to see in the legend. I also want to show a checkbox in front of the legend, as it is not automatically clear for users that series can be shown/hidden by clicking on the legend.

  • Posted 3 April 2019, 5:39 am EST

    Hi there. Just following up on this. So the documentation says you can use the itemFormatter to format elements of the chart:-

    “Gets or sets the item formatter function that allows you to customize the appearance of the chart elements.”

    Are you suggesting that the only thing that you can actually format is the chart symbol series?

    I need to format data labels, but the itemFormatter function is only ever called once, and the “chart element” is only every type 8, despite it actually being a pie chart that does’nt have any symbols.

Need extra support?

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

Learn More

Forum Channels