🍉 Meet Flexmonster Pivot Table & Charts 2.9.Check out all the hot features!
Get Free Trial

Modify node shape in line chart depending on data

Answered
Anuroop Pendela asked on May 4, 2021

Hello Flexmonster team,
We have a requirement where we need to show different shapes based on data (either x or y) of the line chart. For now, if the y-axis data is 0, then we need to render a rhombus or triangle. And for other cases, we need to show the default circle. Is it possible with flex monster? I am using flex monster in react framework with typescript. Please help us out on this. 
Thank you!

3 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 5, 2021

Hello,
 
Thank you for reaching out.
 
We suggest using the customizeChartElement hook to perform such customization. This API call allows customizing separate chart elements in Flexmonster Charts. For example, you can add custom attributes or set element colors. For example, you can replace the SVG element representing the circle with the desired one based on the value passed to the handler.
 
You are welcome to see the JSFiddle we have prepared for a reference: https://jsfiddle.net/flexmonster/g7wx8qkv/.
 
Please let us know if it works for you.
Looking forward to hearing the feedback.
 
Regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 12, 2021

Hello,
 
We are wondering if our suggestion was helpful.
 
Looking forward to your reply.
 
Regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 19, 2021

Hi,
 
We are reaching out to ask if the provided approach works for you.
 
Looking forward to your feedback.

Regards,
Illia

Please login or Register to Submit Answer