I'm trying to replace MSCHART from my projects with Chart helpers (System.Web.Helpers) but I'm having a lot of difficulties:
1) How can I insert percentage values into a PIE chart?
2) Can I move the chart Value outside pie?
What I have tried:
Chart myChart = new Chart(width: 800, height: 400, themePath: "~/xml/hst_pie_tech.xml", theme: ChartTheme.Vanilla3D)
.AddTitle("Volume ")
.AddSeries("Volume",
chartType: "Pie",
xValue: dataView, xField: "Technology",
yValues: dataView, yFields: "Qty",
markerStep: 1
);
="1.0"="utf-8"
<Chart>
<ChartAreas>
<ChartArea Name="Default" _Template_="All">
<AxisY
LineColor="0, 0, 0"
TitleFont="{0}, 14pt, style=Bold"
TitleForeColor="0, 0, 0"
>
<LabelStyle Font="{0}, 6.75pt, GdiCharSet=0" ForeColor="0, 0, 0" />
</AxisY>
<AxisX
Interval="1"
TitleFont="{0}, 18pt, GdiCharSet=0" >
<LabelStyle Font="{0}, 6.75pt, GdiCharSet=0" ForeColor="0, 0, 0" />
</AxisX>
</ChartArea>
</ChartAreas>
<Titles>
<Title _Template_="All" Font="{0}, 14pt, style=Bold" ForeColor="0, 0, 0"></Title>
</Titles>
<Series>
<Series
Name="Volume"
BorderWidth="2"
Color="153, 204, 255"
BorderColor="164, 164, 164"
BorderDashStyle="Solid"
ShadowColor="128, 128, 128, 128"
ShadowOffset="1"
IsValueShownAsLabel="true"
Font="{0}, 8pt"
BackGradientStyle="TopBottom"
BackSecondaryColor="0, 102, 153"
LabelForeColor="0, 0, 0"
>
<SmartLabelStyle Enabled="True" />
</Series>
</Series>
<Legends>
<Legend Alignment="Center" Docking="Left" Name="Technology" Font="{0}, 10pt, style=Italic, GdiCharSet=0">
</Legend>
</Legends>
<BorderSkin PageColor="Control" BackColor="CornflowerBlue" BackSecondaryColor="CornflowerBlue" />
</Chart>