The following XAML shows how to choose the chart type, choose the palette, set up axes, and add a data series for a line chart:
XAML |
Copy Code
|
---|---|
<c1:C1Chart x:Name="_chart" Palette="Module" ChartType="Line" Foreground="#a0000000" Background="#e0ffffff" > <c1:C1Chart.View> <c1:ChartView> <c1:ChartView.AxisX> <c1:Axis Title="Year" MajorGridStroke="Transparent" /> </c1:ChartView.AxisX> <c1:ChartView.AxisY> <c1:Axis Title="Quarterly Sales (in $1,000)" MajorGridStroke="#40000000" AnnoFormat="n0" /> </c1:ChartView.AxisY> </c1:ChartView> </c1:C1Chart.View> <c1:C1ChartLegend Position="Right" /> <c1:C1Chart.Data> <c1:ChartData ItemNames="P1 P2 P3 P4 P5"> <c1:DataSeries Label="s1" Values="20, 22, 19, 24, 25" ConnectionStrokeThickness="6" /> <c1:DataSeries Label="s2" Values="8, 12, 10, 12, 15" /> </c1:ChartData> </c1:C1Chart.Data> </c1:C1Chart> |