Charts: Multiple colors for the same line

Created on 14 Jan 2019  路  5Comments  路  Source: danielgindi/Charts

Hi there

I am trying to draw a single line with a different color according to a y-value-threshold.
Is there a way to achieve such a thing?

This is the UI I am currently using but it is not beautiful, that is why I am trying to apply the background color directly on the line.

Thanks !!!

Screenshot

All 5 comments

check

    /// All the colors that are used for this DataSet.
    /// Colors are reused as soon as the number of Entries the DataSet represents is higher than the size of the colors array.
    var colors: [NSUIColor] { get }

I may be wrong, but this will not color a single set/line with multiple colors.

Like this:

Example

eh you are talking about gradient lines? that's a different story then. There is a PR but we didn't review yet.

@liuxuan30 Are there any plan to review/merge the PR in near future?

Looking for this feature too! Love the library.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sjdevlin picture sjdevlin  路  3Comments

valeIT picture valeIT  路  3Comments

anhltse03448 picture anhltse03448  路  3Comments

ahmedsafadii picture ahmedsafadii  路  3Comments

JW00332 picture JW00332  路  4Comments