有没有一种方法可以更改RadChart图例文本颜色?

时间:2019-11-12 16:47:31

标签: telerik nativescript nativescript-telerik-ui

我正在尝试使用深色主题设置应用样式,并且图例项为黑色。有没有办法更改图例项的颜色?有一个属性可以更改标题颜色,但不会影响其他系列名称。

example picture

<RadPieChart allowAnimation="true" height=100% row="1" col="0" colSpan="12">
               <DonutSeries tkPieSeries
                   selectionMode="DataPoint"
                   expandRadius="0.4"
                   outerRadiusFactor="0.7"
                   innerRadiusFactor="0.4"
                   valueProperty="Amount"
                   legendLabel="Country"
                   [items]="Countries" class="white"></DonutSeries>
               <Palette tkPiePalette >
                       <PaletteEntry tkPiePaletteEntry fillColor="#EB5E55" strokeColor="#EB5E55"></PaletteEntry>
                       <PaletteEntry tkPiePaletteEntry fillColor="#D81E5B" strokeColor="#D81E5B"></PaletteEntry>
                       <PaletteEntry tkPiePaletteEntry fillColor="#FDF0D5" strokeColor="#FDF0D5"></PaletteEntry>
                       <PaletteEntry tkPiePaletteEntry fillColor="#C6D8D3" strokeColor="#C6D8D3"></PaletteEntry>
                       <PaletteEntry tkPiePaletteEntry fillColor="#00FDDC" strokeColor="#00FDDC"></PaletteEntry>
                       <PaletteEntry tkPiePaletteEntry fillColor="#495F41" strokeColor="#495F41"></PaletteEntry>
                   </Palette>
             <Palette tkPiePalette seriesState="Selected">
                   <PaletteEntry tkPiePaletteEntry fillColor="#EB5E55" strokeColor="#EB5E55"></PaletteEntry>
                   <PaletteEntry tkPiePaletteEntry fillColor="#D81E5B" strokeColor="#D81E5B"></PaletteEntry>
                   <PaletteEntry tkPiePaletteEntry fillColor="#FDF0D5" strokeColor="#FDF0D5"></PaletteEntry>
                   <PaletteEntry tkPiePaletteEntry fillColor="#C6D8D3" strokeColor="#C6D8D3"></PaletteEntry>
                   <PaletteEntry tkPiePaletteEntry fillColor="#00FDDC" strokeColor="#00FDDC"></PaletteEntry>
                   <PaletteEntry tkPiePaletteEntry fillColor="#495F41" strokeColor="#495F41"></PaletteEntry>
            </Palette>
               <RadLegendView tkPieLegend position="Right" title="Country" offsetOrigin="TopRight" width="110" enableSelection="true" titleColor="white"></RadLegendView>
       </RadPieChart>

1 个答案:

答案 0 :(得分:0)

我认为从今天起它不受支持,您可能要关注Github中的开放feature request

作为解决方法,您可以关闭默认图例视图,并使用“标签”呈现自己的图例列表。