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,或項容器風格,嘗試找到它。它只是一個提示 –