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 displaying a dataset of ~300 double/date data pairs. Because I wanted to highlight the maximum value and the minimum value in that range I used a CombinedChartView (LineChart for the 300 values, and ScatterChart for the 2 max/min values).
What I'd like to accomplish now is to get only the 2 date strings of the max/min values displayed on the xAxis (as labels like "2015-05-03" below the left max value and "2016-04-22" below the right min value).
Is there a way to tell the CombinedChartView to only use the data from the ScatterChart for the labels on the x-Axis? Then it would only display the 2 min/max value labels.
What I've tried so far is to implement a custom IAxisValueFormatter and then only return a date String if stringForValue gets hit with either my min or my max value (otherwise just return "").
But for some reason stringForValue only gets called with 5 unique values - I guess the width estimation figured there's only room for 5 labels on the screen? And those 5 values don't contain my min/max values -> so no label is displayed at all.
The text was updated successfully, but these errors were encountered:
If I were you, I'd like to override x axis to only generate the min/max values and display it.
override computeAxisValues(min: Double, max: Double) and feed axis.entries only the x point of you min/max value
You might need to add more parameters or create sub axis class though.. axis class does not hold chart data. It only knows the range and intervals.
Hey guys,
I'm displaying a dataset of ~300 double/date data pairs. Because I wanted to highlight the maximum value and the minimum value in that range I used a CombinedChartView (LineChart for the 300 values, and ScatterChart for the 2 max/min values).
What I'd like to accomplish now is to get only the 2 date strings of the max/min values displayed on the xAxis (as labels like "2015-05-03" below the left max value and "2016-04-22" below the right min value).
Is there a way to tell the CombinedChartView to only use the data from the ScatterChart for the labels on the x-Axis? Then it would only display the 2 min/max value labels.
What I've tried so far is to implement a custom IAxisValueFormatter and then only return a date String if stringForValue gets hit with either my min or my max value (otherwise just return "").
But for some reason stringForValue only gets called with 5 unique values - I guess the width estimation figured there's only room for 5 labels on the screen? And those 5 values don't contain my min/max values -> so no label is displayed at all.
The text was updated successfully, but these errors were encountered: