x和y轴标签的Silverlight图表
问题描述:
我有一个图表的ColumnSeries及其工作正常,但我想补充月为x轴主标签和没有问题在Ÿ主标签的 - 轴。x和y轴标签的Silverlight图表
<toolkit:Chart Title="Issue Occurrence Trend">
<toolkit:ColumnSeries ItemsSource="{Binding}" AnimationSequence="Simultaneous" IndependentValueBinding="{Binding Month}" DependentValueBinding="{Binding NoIssue}" >
</toolkit:ColumnSeries>
</toolkit:Chart>
需要帮助。
答
是否这样?
<toolkit:Chart Title="Issue Occurrence Trend">
<toolkit:Chart.Axes>
<toolkit:CategoryAxis Title="Month" Orientation="X" />
<toolkit:CategoryAxis Title="No of Issue" Orientation="Y" />
</toolkit:Chart.Axes>
<toolkit:ColumnSeries ItemsSource="{Binding}" AnimationSequence="Simultaneous" IndependentValueBinding="{Binding Month}" DependentValueBinding="{Binding NoIssue}" >
</toolkit:ColumnSeries>
</toolkit:Chart>
我给了它的名称,不能在代码隐藏中设置标题。 – Hukam
这种方式: CategoryAxis xAxis = this.chart.ActualAxes.Where(a => a.Orientation == AxisOrientation.X).FirstOrDefault()as CategoryAxis; xAxis.Title =“title”; – Slyvain
非常感谢您的帮助。更多设置标题后,问题数量值显示在图表右侧。 – Hukam