使用方式,
1,web.config中添加
<httpHandlers>
<add verb="*" path="ofc_handler.ofc" type="OpenFlashChart.WebHandler.ofcHandler, OpenFlashChart"/>
</httpHandlers>
2,在数据生成的时候,把chart的示例赋予control中的Chart属性
具体见代码。
ArrayList data1 = new ArrayList();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < temp =" rand.Next(30);"> 20)
data1.Add(new LineDotValue(temp, "#fe0"));
else
{
data1.Add(temp);
}
}
OpenFlashChart.LineHollow line1 = new LineHollow();
line1.Values = data1;
line1.HaloSize = 0;
line1.Width = 2;
line1.DotSize = 5;
line1.Tooltip = "提示:#val#";
chart.AddElement(line1);
chart.Title = new Title("line演示");
chart.Y_Axis.SetRange(0, 35, 5);
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
OpenFlashChartControl1.EnableCache = false;
OpenFlashChartControl1.Chart = chart;