如何改变Mvc饼图颜色?

时间:2012-02-12 12:10:24

标签: asp.net-mvc asp.net-mvc-3 charts pie-chart

我有一个图表类型的饼图,需要更改用作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"" />

作为字符串,那么我可以在哪里设置每个饼点或部分的颜色!

2 个答案:

答案 0 :(得分:1)

发现它......

我用它们来骗他们

  

     

<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 = “” 行 “” &GT;

</Legend>
     

     

将馅饼着色的关键是在这里改变

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

根据需要添加偶数色RGB:)

答案 1 :(得分:0)

调色板应设置为“无”以使其正常工作

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