Changing line color

Posted by: scadavantagesupport on 24 October 2017, 4:16 am EST

    • Post Options:
    • Link

    Posted 24 October 2017, 4:16 am EST

    Is it possible to use Flex Chart to draw a line chart where the line changes color at certain limits or based on color data in the data Series? As a fall back I was thinking that I might be able to use a different series for each pen color. Is it possible to create a line series with breaks using NaN values?

  • Posted 24 October 2017, 4:09 pm EST

    Hi,

    Yes its possible to do so in FlexChart. Please refer to the FlexChartCustomization->LineStyles sample that’s available in the installed samples for an example. The location for it would be:

    Documents\ComponentOne Samples\WPF\C1.WPF.FlexChart\CS\FlexChartCustomization

    As for the NaN values, FlexChart by default draws the Line charts with breaks when using NaN values. You can set the InterpolateNulls ChartOption to true if the breaks are not required. The Binding sample in FlexChartExplorer provides an example on this. The location for it would be:

    Documents\ComponentOne Samples\WPF\C1.WPF.FlexChart\CS\FlexChartExplorer

    Please let us know in case of any further queries.

    Regards,

    Ankit

  • Posted 25 October 2017, 1:22 am EST

    Thank-you, that’s just what we need.

    Is it also possible to draw a line chart using a step function instead of linear interpolation?

  • Posted 25 October 2017, 7:15 pm EST

    You can use the SymbolRendering event of a Series to draw the lines using steps. Attached is a sample that demonstrates the same.

    Also, we’ll be introducing Step charts as built in ChartTypes with FlexChart in our coming release. This would be around mid of next month.

    Regards,

    Ankit

    StepChartDemo.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels