繁体   English   中英

如何更改Mvc饼图颜色?

[英]How to change Mvc Pie Chart colors?

我有一个饼图图表类型,需要更改Mvc图表中用作默认设置的颜色!

这是我的图表系列

<Series _Template_=""All"" 
ShadowOffset=""2"" 
BorderColor=""64, 64, 64"" 
BorderDashStyle=""Solid"" 
BorderWidth=""1"" 
Color=""189, 215, 191""
IsValueShownAsLabel=""false"" 
Font=""Hacen Typographer, 12pt, GdiCharSet=0"" 
LabelForeColor=""100, 100, 100"" 
CustomProperties=""DoughnutRadius=60, 
PieLabelStyle=Outside, 
PieDrawingStyle=SoftEdge"" 
ChartType=""pie"" />

作为字符串,那么在哪里可以为每个饼图点或每个部分设置colore!

找到了...

我用这个他们喜欢

 <ChartArea Name=""Default"" _Template_=""All"" BackColor=""Transparent"" BackSecondaryColor=""White"" BorderDashStyle=""Solid"" ShadowColor=""Transparent""> <AxisY> <LabelStyle Font=""Trebuchet MS, 8.25pt, style=Bold"" /> </AxisY> <AxisX LineColor=""64, 64, 64, 64""> <LabelStyle Font=""Trebuchet MS, 8.25pt, style=Bold"" /> </AxisX> </ChartArea> 

 <Legend _Template_=""All"" BackColor=""Transparent"" Docking=""Bottom"" Font=""Trebuchet MS, 8.25pt, style=Bold"" 

LegendStyle =“”行“”>

 </Legend> 

着色馅饼的关键是在此处进行更改

PaletteCustomColors=""180, 189,175;134,192, 106;189, 215, 121""

根据需要添加均匀颜色的RGB :)

调色板应设置为“无”才能起作用

<Chart PaletteCustomColors=""180, 189,175;134,192, 106;189, 215, 121"" Palette=""None"">

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM