You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add custom Skia components to a line chart.
Specifically, I have a simple price chart and I would like to add horizontal lines at specific price values, something like the following:
I'm currently stuck because I can't figure out how to calculate the pixel Y value for each line based on it's original price value. Is there any utility that can calculate the chart Y pixel value based on the Y value? Something like what CartesianChart uses internally to determine the y value of all the data points?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to add custom Skia components to a line chart.
Specifically, I have a simple price chart and I would like to add horizontal lines at specific price values, something like the following:
I'm currently stuck because I can't figure out how to calculate the pixel Y value for each line based on it's original price value. Is there any utility that can calculate the chart Y pixel value based on the Y value? Something like what CartesianChart uses internally to determine the y value of all the data points?
Any help would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions