This is a migrated thread and some comments may be shown as answers.

Limit visible data and make the chart autoscrollable

4 Answers 62 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Prashant
Top achievements
Rank 1
Prashant asked on 20 Jan 2016, 01:44 PM

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

Sort by
0
Prashant
Top achievements
Rank 1
answered on 21 Jan 2016, 11:11 AM

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

0
Todor
Telerik team
answered on 25 Jan 2016, 11:37 AM
Hello 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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Prashant
Top achievements
Rank 1
answered on 27 Jan 2016, 08:01 AM

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

0
Accepted
Todor
Telerik team
answered on 01 Feb 2016, 09:00 AM
Hello 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
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Prashant
Top achievements
Rank 1
Answers by
Prashant
Top achievements
Rank 1
Todor
Telerik team
Share this question
or