FlexChart | ComponentOne
WPF FlexChart / Understanding FlexChart / WPF FlexChart Types / Spline
本主题中
    Spline
    本主题中

    The Spline Chart is similar to the line chart except that it connects data points by using splines rather than straight lines. The chart is used as an alternative to the line chart, but more specifically for representing data that requires the use of curve fittings.

    You need to set the ChartType property to Spline either from the Properties window, in the code behind, or in XAML to create the Spline Chart.

    You can set the Stacking property to Stacked or Stacked100pc to create the stacking WPF Spline Chart.

    WPF Spline Chart

    WPF Spline Chart

    Here is the code demonstrating the implementation:

    <c1:C1FlexChart x:Name="flexChart" 
                    BindingX="Country" 
                    ItemsSource="{Binding DataContext.Data}" 
                    ChartType="Spline">
        <c1:C1FlexChart.Series>
            <c1:Series SeriesName="Sales" 
                       Binding="Sales"/>
            <c1:Series SeriesName="Expenses" 
                       Binding="Expenses"/>
        </c1:C1FlexChart.Series>
    </c1:C1FlexChart>
    
    C#
    拷贝代码
    flexChart.ChartType = C1.Chart.ChartType.Spline;