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

9 posts, 1 answers
  1. qq
    qq avatar
    8 posts
    Member since:
    Nov 2015

    Posted 05 Sep Link to this post

    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.

  2. qq
    qq avatar
    8 posts
    Member since:
    Nov 2015

    Posted 07 Sep Link to this post

    It can be set on ios, but how to set in android?
  3. DevCraft banner
  4. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 07 Sep Link to this post

    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
  5. qq
    qq avatar
    8 posts
    Member since:
    Nov 2015

    Posted 07 Sep in reply to Victor Link to this post

    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.

  6. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 12 Sep Link to this post

    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
  7. qq
    qq avatar
    8 posts
    Member since:
    Nov 2015

    Posted 12 Sep in reply to Victor Link to this post

    Great! Thank you very much!

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

  8. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 13 Sep Link to this post

    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
  9. qq
    qq avatar
    8 posts
    Member since:
    Nov 2015

    Posted 18 Sep in reply to Victor Link to this post

    I hope you can implement that feature. ^_^

  10. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 20 Sep Link to this post

    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
Back to Top
DevCraft banner