C1 Flexchart Linechart Help!

Posted by: kanashkaze02 on 23 February 2025, 11:26 pm EST

  • Posted 23 February 2025, 11:26 pm EST - Updated 24 February 2025, 12:11 am EST

    How to Adjust Legend Line Thickness, Move X-Axis Title, and Fix Gridline Overlap in C1 FlexChart?

    I am working with C1 FlexChart and facing a few issues that I need help with:

    How can I make the legend line thicker?

    How do I move the X-axis title to the left (specifically to the origin [0,0])?

    I modified the major gridline style to be dotted, but it overlaps with the axis line.

    Is there a way to keep the major gridline dotted while ensuring the axis line remains solid?

    Any suggestions or code examples would be greatly appreciated.

    Thanks in advance!

  • Posted 25 February 2025, 9:44 am EST

    Hi,

    This is the default behavior of the Flexchart. If you need to customize these in FlexChart, then you can handle the Rendered event and customize it as per your requirement.

    Please refer the attached sample for the same: FlexChartCustomization.zip

    regards,

    Nitin

  • Posted 26 February 2025, 11:30 pm EST

    Why when you add this line

     flexChart.Series[0].Style = new C1.WPF.Chart.ChartStyle { Stroke = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)) };
    
    the legend do not go transparent?

  • Posted 27 February 2025, 8:04 am EST

    Hi,

    In the sample project we shared, the first series (index 0) is not displayed in the Legend because it does not have a SeriesName set. It is only added so that its SymbolRendered event can be handled, which is used to draw custom lines representing the other three series.

    Since we are drawing custom lines, the Stroke of the Series0 is set to Transparent to prevent the default line from being displayed. The Legend correctly shows the other three series, which are not bound to the ItemsSource and have been added to symbolize the custom lines we draw.

    We hope we were able to make things clear for you.

    Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels