我正在尝试使用不同的图例标签,它们自己的颜色代表条形系列中的每一列。正如您在屏幕截图中看到的那样,我无法让其他图例出现。
每个人都应该有不同的颜色。这是我的html。
<CategoricalAxis tkCartesianHorizontalAxis allowPan="true" allowZoom="true"></CategoricalAxis>
<LinearAxis tkCartesianVerticalAxis allowPan="true"></LinearAxis>
<BarSeries tkCartesianSeries [items]="LivestockData"
categoryProperty="Year" valueProperty="Amount" seriesName="Bar" showLabels="true" legendTitle="Cattle"></BarSeries>
<!-- >> chart-legend-angular-definition -->
<RadLegendView tkCartesianLegend position="Bottom" title="Species"
height="150" enableSelection="true"></RadLegendView>
<!-- << chart-angular-styling-bars -->
<Palette tkCartesianPalette seriesName="Bar">
<PaletteEntry tkCartesianPaletteEntry fillColor="#A05BC5"></PaletteEntry>
</Palette>
</RadCartesianChart>
这是正在显示的数据。
{ species: "Cattle", Amount: 4771, Year: 1980 },
{ species: "Sheep and goats", Amount: 3862, Year: 2000 },
{ species: "Pigs", Amount: 187, Year: 2002 },
{ species: "Poultry", Amount: 2941, Year: 1990 }
物种属性值应该在传说中,但我只能显示牛的价值,而且我还需要不同的颜色。任何帮助表示赞赏。