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 have data sampled at every second and I want to plot a total of 7 days worth of data on a line graph. Obviously this would be too busy if I show the entire data set so I am looking for a way to implement something that allow me to show dynamically scaled data. Specifically, after the user has performed a zoom action, if I know what the graph's x value range is, then I can re-render the graph using data prepared specific for that range.
In the Android API, there is a callback function called "onChartGestureEnd" but I cant find anything similar for the iOS API. I also dont know how to find the current data range (x range) that is being displayed on the view port.
Thanks in advance if someone can give me a pointer or two.
The text was updated successfully, but these errors were encountered:
if you are talking about gesture handlers, it's in BarLineChartViewBase. Since v3 is released, you have to take a look at if lowestVisibleXIndex and highestVisibleXIndex work for you, or you have to look at the new implementation.
I remember there are several apis in ChartTransformer or ChartViewPortHandler can do this
For generic gestures, the chart does not provide delegate callbacks, because it does not have to. It's iOS, you can add any gesture recognizers you want dynamically from outside the chart, and do whatever with them.
As for specifics that you do need the chart for - they are implemented.
publicprotocolChartViewDelegate{/// Called when a value has been selected inside the chart./// - parameter entry: The selected Entry./// - parameter highlight: The corresponding highlight object that contains information about the highlighted position such as dataSetIndex etc.optionalfunc chartValueSelected(chartView:ChartViewBase, entry:ChartDataEntry, highlight:Highlight)// Called when nothing has been selected or an "un-select" has been made.optionalfunc chartValueNothingSelected(chartView:ChartViewBase)// Callbacks when the chart is scaled / zoomed via pinch zoom gesture.optionalfunc chartScaled(chartView:ChartViewBase, scaleX:CGFloat, scaleY:CGFloat)// Callbacks when the chart is moved / translated via drag gesture.optionalfunc chartTranslated(chartView:ChartViewBase, dX:CGFloat, dY:CGFloat)}
I have data sampled at every second and I want to plot a total of 7 days worth of data on a line graph. Obviously this would be too busy if I show the entire data set so I am looking for a way to implement something that allow me to show dynamically scaled data. Specifically, after the user has performed a zoom action, if I know what the graph's x value range is, then I can re-render the graph using data prepared specific for that range.
In the Android API, there is a callback function called "onChartGestureEnd" but I cant find anything similar for the iOS API. I also dont know how to find the current data range (x range) that is being displayed on the view port.
Thanks in advance if someone can give me a pointer or two.
The text was updated successfully, but these errors were encountered: