|
|
|
|
|
|
|
|
There are currently:
59 anonymous users online.
0 of 204 registered users online.
There have been 10503 Page Hits by
8051 users
|
|
|
|
|
Fill Styles
C# Example Code
{
Uri uriBk = new Uri(@"http://www.sasq.co.uk/images/marble.jpg");
System.Random r= new System.Random();
chart.Legend.Visible = true;
chart.Legend.Style.Font = new Font("Arial", 8);
chart.CanvasStyle.ImageUri = uriBk;
chart.AxisStyle.FillColor = Color.FromArgb(0x80, 0xff, 0xff, 0xff);
chart.Legend.Style.FillColor = Color.FromArgb(0x80, 0xff, 0xff, 0xff);
chart.ChartStyle.Type = SasqChart.Style.FillType.None;
chart.OutputFormat = ImageFormat.Jpeg;
int index = 0;
for(SasqChart.Style.FillType type = SasqChart.Style.FillType.GradientHorizontal;
type <= SasqChart.Style.FillType.InnerFillHorizontal;
type++)
{
chart.Series[index].Type = ChartType.Bar;
chart.Series[index].Style.Type = type;
chart.Series[index].Name = type.ToString();
chart.Series[index].Data.Add(new DataPoint(100.0 + (r.NextDouble() * 50.0)));
index++;
}
}
ASP.Net C# Example
<%@ Register tagPrefix="SasqChart" Namespace="SasqChart" Assembly="SasqChart" %>
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<HTML>
<HEAD>
<title>Simple C# SasqChart Example</title>
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Uri uriBk = new Uri(@"http://www.sasq.co.uk/images/marble.jpg");
System.Random r= new System.Random();
chart.Legend.Visible = true;
chart.Legend.Style.Font = new Font("Arial", 8);
chart.CanvasStyle.ImageUri = uriBk;
chart.AxisStyle.FillColor = Color.FromArgb(0x80, 0xff, 0xff, 0xff);
chart.Legend.Style.FillColor = Color.FromArgb(0x80, 0xff, 0xff, 0xff);
chart.ChartStyle.Type = SasqChart.Style.FillType.None;
chart.OutputFormat = ImageFormat.Jpeg;
int index = 0;
for(SasqChart.Style.FillType type = SasqChart.Style.FillType.GradientHorizontal;
type <= SasqChart.Style.FillType.InnerFillHorizontal;
type++)
{
chart.Series[index].Type = ChartType.Bar;
chart.Series[index].Style.Type = type;
chart.Series[index].Name = type.ToString();
chart.Series[index].Data.Add(new DataPoint(100.0 + (r.NextDouble() * 50.0)));
index++;
}
}
</script>
</HEAD>
<body>
<SasqChart:WebChartControl id="chart" runat="server" width="600" height="400" />
</body>
</HTML>
|