こんにちは
MSチャートコントロールを使用して単純な円グラフを作成しようとしています。円グラフがブラウザでレンダリングされると、取り除くことができない円グラフの周りにパディングが表示されます。円グラフを画像の端にパディングやマージンなしで配置したいと思います。これをどのように達成できるかについてのアイデアはありますか?
下の私のコードでは、パディングは青で強調表示されています。つまり、Chart1.BackColor = System.Drawing.Color.Blue;
<script type="text/C#" runat="server">
protected void Page_Load(object sender, EventArgs e)
{
//Set the chart type
Chart1.Series["Series1"].ChartType = SeriesChartType.Pie;
//add points
Chart1.Series["Series1"].Points.AddY(12);
Chart1.Series["Series1"].Points.AddY(45);
Chart1.Series["Series1"].Points.AddY(67);
//set back color of chart object
Chart1.BackColor = System.Drawing.Color.Blue;
//set back color of chart area
Chart1.ChartAreas["ChartArea1"].BackColor = System.Drawing.Color.Green;
}
</script>
<asp:Chart ID="Chart1" runat="server">
<Series>
<asp:Series Name="Series1" ChartType="Pie">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>