Is it possible to use customer labelStyle (i.e. 0 =Heavy, 1=Soft, 2=Good, 3=Firm))?

Hi there,

I am working on a LinearGauge, which is simply displaying a digital data (say ranging from 0 - 3). However, the special point is that the label should be showing the meaning of each value instead of the value itself.

I am looking into the labelStyle only to find out the format property, which is not flexible enough to replace the {value} to other strings. 

 Is it even possible to do that with Syncfusion? I can't find such an example in any document. Many thanks!


Regards,

Hao



3 Replies

IR Indumathi Ravi Syncfusion Team June 13, 2022 12:11 PM UTC

Hi Hao,


Thank you for contacting Syncfusion support.


Please find the details for your queries from the below table.

Queries

Details

I am looking into the labelStyle only to find out the format property, which is not flexible enough to replace the {value} to other strings

The “format” property in the “labelStyle” are used to add a user-defined unit in axis labels. It is not used to change the label completely in the Linear Gauge. Please find the sample to demonstrate the same and it can be found from the below link.

 

https://stackblitz.com/edit/react-x5t3ss-w4hzpb?file=index.js

Is it even possible to do that with Syncfusion? I can't find such an example in any document

To achieve your requirement, the "axisLabelRender" event can be used to customize axis labels. In the below sample, we have illustrated the same.

 

https://stackblitz.com/edit/react-x5t3ss-vwphbs?file=index.js


Please let us know if the above sample meets your requirement and let us know if you need any further assistance.


Regards,

Indumathi R.



HA Hao June 16, 2022 02:45 PM UTC

Thank you so much Indumathi! It is amazing!



IR Indumathi Ravi Syncfusion Team June 17, 2022 01:31 PM UTC

Hi Hao,


Most Welcome.


Please get back to us if you need any further assistance.


Regards,

Indumathi R.


Loader.
Up arrow icon