Show percent sign in yAxis values

Posted by: brzozowski.m24 on 8 June 2021, 9:17 pm EST

  • Posted 8 June 2021, 9:17 pm EST

    Hello, I'm wondering if it's possible to add '%' sign on each value on y-axis. Currently I have a label with string 'Data in percentage (%)' but I would like to place % sign on each value like: 1%, 0.9% etc.
    I'm using Angular with wj-flex-chart.

  • Replied 10 June 2021, 12:19 am EST


    As per my understanding, your Y-axis data labels are string type if that's the case you can use the itemFormatter property of axisY which is FlexChart's property. Please refer to the code snippet:

    flexchart.axisY.itemFormatter= itemFormatter;

    itemFormatter(_: any, label: { val: any, text: string, pos: Point, cls: string }) {
    label.text = label.val + "%"
    return label;

    Let us know if that's works for you.

Need extra support?

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

Learn More

Forum Channels