100分:求一示例页面数据源,改用后台代码实现的方法
在看componentOne Chart组合图(上为直方图、下为折线图)的例子,部分代码(完整代码可在http://www.componentone.com/SuperProducts/StudioWindowsPhone/Demos/下,本例仅是其中的一例MultiplePlotAreas)如下:
<!--ContentPanel - 在此处放置其他内容-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<c1chart:C1Chart Palette="Metro" Margin="10 10 10 15">
<c1chart:C1Chart.Data>
<c1chart:ChartData ItemNames="P1 P2 P3 P4 P5 P6 P7 P8 P9 P10" >
<c1chart:DataSeries Label="s1" Values="10 22 38 45 35 10 22 38 45 35" ChartType="Column" AxisY="y2" />
<c1chart:DataSeries Label="s3" Values="7 5 6 5 6 7 5 5 6 4" ChartType="Line" />
</c1chart:ChartData>
</c1chart:C1Chart.Data>
<!-- Configure axes -->
<c1chart:C1Chart.View>
<c1chart:ChartView>
<c1chart:ChartView.PlotAreaRowDefinitions>
<c1chart:PlotAreaRowDefinition Height="*"/>
<c1chart:PlotAreaRowDefinition Height="3*" />
</c1chart:ChartView.PlotAreaRowDefinitions>
<c1chart:Axis x:Name="y2" PlotAreaIndex="1" AxisType="Y" />
</c1chart:ChartView>
</c1chart:C1Chart.View>
<c1chart:C1ChartLegend Position="Top" Orientation="Horizontal" HorizontalAlignment="Right"/>
</c1chart:C1Chart>
</Grid>
运行正常。想把其中的数据系列,
<c1chart:ChartData ItemNames="P1 P2 P3 P4 P5 P6 P7 P8 P9 P10" >
<c1chart:DataSeries Label="s1" Values="10 22 38 45 35 10 22 38 45 35" ChartType="Column" AxisY="y2" />
<c1chart:DataSeries Label="s3" Values="7 5 6 5 6 7 5 5 6 4" ChartType="Line" />
</c1chart:ChartData>
改为后台代码自定义,如何实现?