LineChart not changing color

Posted by: ehh on 5 May 2021, 10:35 pm EST

    • Post Options:
    • Link

    Posted 5 May 2021, 10:35 pm EST - Updated 29 September 2022, 12:50 am EST

    Hello,

    Im trying to change the color of my LineChart, but it disappears. Ive tried with rgb, rgba, and named colors. It is working fine for bar and column Charts.

  • Posted 9 May 2021, 2:58 pm EST

    Hi,

    When the ChartType is Line/LineSymbols, the line gets drawn and color is set using the stroke property. Please refer to the following code snippet:

    <FlexChart ItemsSource="forecasts"ChartType="ChartType.LineSymbols" BindingX="Date" Binding="TemperatureC">
        <SeriesCollection>
            <Series Binding="TemperatureC" Style="@("stroke:rgb(44,177,185);fill:rgb(44,177,190);")"></Series>
        </SeriesCollection>
    </FlexChart>
    

    Hope it helps!

    Regards,

    Manish Gupta

  • Posted 10 May 2021, 6:04 pm EST

    That did it! Thanks

Need extra support?

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

Learn More

Forum Channels