Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set diffent style to single line graph #2336

Closed
ajaysinghthakur opened this issue Apr 7, 2017 · 2 comments
Closed

Set diffent style to single line graph #2336

ajaysinghthakur opened this issue Apr 7, 2017 · 2 comments

Comments

@ajaysinghthakur
Copy link

trying to achieve below and is available in android
ng45
http://stackoverflow.com/questions/33011210/set-diffent-style-to-single-line-graph-in-mpandroidchart

@liuxuan30
Copy link
Member

liuxuan30 commented Apr 10, 2017

This just requires you to override drawLinear to use different line dash for each segment.

@liuxuan30
Copy link
Member

liuxuan30 commented Apr 10, 2017

Or, make two line data sets, one is solid and one is dashed, and use

    /// This is how much (in pixels) into the dash pattern are we starting from.
    var lineDashPhase: CGFloat { get }
    
    /// This is the actual dash pattern.
    /// I.e. [2, 3] will paint [--   --   ]
    /// [1, 3, 4, 2] will paint [-   ----  -   ----  ]
    var lineDashLengths: [CGFloat]? { get set }

in LineChartDataSet (from ILineChartDataSet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants