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

How can I set the line color and spot color of the trackball

8 Answers 189 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.
qq
Top achievements
Rank 1
qq asked on 05 Sep 2016, 06:02 AM

The color of line and spot of the trackball is always black.

I want apply the black background and I want change color of the trackball.

How can I do it?

And if there is any method to show the horizonal line when showing trackball. It only show the vertical line by default.

Thank you very much.

8 Answers, 1 is accepted

Sort by
0
qq
Top achievements
Rank 1
answered on 07 Sep 2016, 05:28 AM
It can be set on ios, but how to set in android?
0
Victor
Telerik team
answered on 07 Sep 2016, 03:13 PM
Hello qq dow,

Thank you for writing.
To customize the trackball you can provide a new trackball content adapter. To do so you have to  inherit from ChartTrackballContentAdapter and override the methods you need. When your class is done you have to tell the trackball to use it like this:
trackBall.setContentAdapter(yourAdapterInstance);

Finally, to modify the point indicators of the trackball you have to set the intersection point paint. For example:
TrackballPresenter presenter = (TrackballPresenter) trackBall.getPopupPresenter();
presenter.setIntersectionPointPaint(yourPaint);

Please write again if you need further assistance.

Regards,
Victor
Telerik by Progress
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
qq
Top achievements
Rank 1
answered on 08 Sep 2016, 01:16 AM

Thanks for your advice.

But I can't do it because how can I get the TrackBall object from my chart and set it to my chart?

I'm confused.

0
Accepted
Victor
Telerik team
answered on 12 Sep 2016, 07:26 AM
Hello qq dow,

Your chart has a getBehaviors() method which returns a collection of ChartBehavior. One of those behaviors is your ChartTrackballBehavior instance, you just have to find it and cast it. Also, you can simply keep a reference to the behavior when you initialize the chart.

Regards,
Victor
Telerik by Progress
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
qq
Top achievements
Rank 1
answered on 13 Sep 2016, 01:29 AM

Great! Thank you very much!

And if there is any way to draw herizontal line cross the trackbal base on this presenter?

0
Victor
Telerik team
answered on 13 Sep 2016, 08:14 AM
Hi qqdow,

You are describing the trackball crosshair feature which currently is not implemented on android. Please excuse us for the inconvenience.

Regards,
Victor
Telerik by Progress
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
qq
Top achievements
Rank 1
answered on 18 Sep 2016, 08:44 AM

I hope you can implement that feature. ^_^

0
Victor
Telerik team
answered on 20 Sep 2016, 11:12 AM
Hello qq dow,

Thanks for the feedback. We will definitely implement it in a future release since a few clients (yourself included) already asked for it. We just have not planned it yet.

Regards,
Victor
Telerik by Progress
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
qq
Top achievements
Rank 1
Answers by
qq
Top achievements
Rank 1
Victor
Telerik team
Share this question
or