0
我使用WPF图表工具包:System.Windows.Controls.DataVisualization.Charting绑定颜色IndependentValue
我有这样的事情:
<charting:Chart>
<charting:Chart.Axes>
<charting:LinearAxis Orientation="Y" />
<charting:CategoryAxis Orientation="X" />
</charting:Chart.Axes>
<charting:ColumnSeries
IndependentValuePath="RangeText"
DependentValueBinding="{Binding PercentValue}"
ItemsSource="{Binding ResultCollection}"/>
</charting:Chart>
结合本:
ObservableCollection<Result> Results { get; set; }
public Result
{
public string RangeText { get; set; }
public float PercentValue { get; set; }
public bool IsAligned { get; set; }
}
我想要做的是将IsAligned设置为true时,将IndependentValue文本的颜色更改为红色。我怎样才能做到这一点?
格式化使用值转换器 –
如何?___________ – ConditionRacer
我还没有过与图表库工作的很多,但肯定它有一个ItemTemplate,或项容器风格,尝试找到它。它只是一个提示 –