Hi,
I have bubble series with datetimecontinuous axis. I want to plot all data based but want to show data based on 20 datetime values on x axis at a time and rest chart should be scrollable. Also the chart must be scrolled to the most recent point at the time of loading. Is there any way to achieve it?
Thanks,
Prashant Bharti
4 Answers, 1 is accepted
Hi,
Finally, i found a thread which provided partial solution of my requirement. I am still facing some more problems which are as follows:
1) I am using Date Time Continuous axis as my X-axis. I am showing Weekdays on horizontal axis (Fri,Sat...). Is there a simple way to start horizontal axis at "Sunday" and end at "Saturday" .i.e. (Sun,Mon,Tue,Wed...) and plot data correspondingly.
2) Is there any way to count total number of labels on horizontal axis because in one of the charts, i have to show data based on 20 date labels on x-axis and i am using DateTimeContinuous axis with setMajorStep(1). I have to show all the dates since the very first reading even if data not available corresponding to the date.
3) How can i animate a PIE chart from center like moving needle in the clock.
Thanks,
Prashant
Thank you for your questions.
1. Regarding the zoon and pan of the chart, you can refer to this forum post. However, there is no "easy way to define that the data will contain just one week - you will need to simulate it based on your data. For example if it contains data from 4 weeks, you can zoom the horizontal chart 4 times, which should lead to similar result.
2. Here's how to see the number of labels on the horizontal axis:
chart.getHorizontalAxis().getModel().ticks().size()
3. More information about the animation in Chart for Android is available in its online documentation. If I understand correctly the desired outcome, you can create an animation group and include scale and rotate animations.
I hope this information helps.
Regards,
Todor
Telerik
Hi,
chart.getHorizontalAxis().getModel().ticks().size()......is not working in my case. It is always returning "0". I am dealing with bubble series and datetimecontinuous axis.
Thanks,
Prashant
The value of ticks is 0 initially since the labels haven't been drawn yet. You can add this code to layout change listener. Here's an example:
chart.addOnLayoutChangeListener(
new
View.OnLayoutChangeListener() {
@Override
public
void
onLayoutChange(View v,
int
left,
int
top,
int
right,
int
bottom,
int
oldLeft,
int
oldTop,
int
oldRight,
int
oldBottom) {
int
labelsCount = chart.getHorizontalAxis().getModel().ticks().size();
}
});
Let us know if you need further assistance.
Regards,
Todor
Telerik