ChartDirector
1 Page UI:
<%@ Register TagPrefix="chart" Namespace="ChartDirector" Assembly="netchartdir" %>
<div>
<chart:WebChartViewer ID="WebChartViewer1" runat="server" height="300px" width="600px" />
</div>
2 Code-Behind steps:
// The data for the bar chart
double[] data = {85, 156, 179.5, 211, 123};
// The labels for the bar chart
string[] labels = {"Mon", "Tue", "Wed", "Thu", "Fri"};
2 .1 new IChart
// Create a XYChart object of size 250 x 250 pixels
XYChart c = new XYChart(250, 250);
// Set the plotarea at (30, 20) and of size 200 x 200 pixels
c.setPlotArea(30, 20, 200, 200);
2.2 add image Layer
// Add a bar chart layer using the given data
c.addBarLayer(data);
// Set the labels on the x axis.
c.xAxis().setLabels(labels);
2.3 output chart
// output the chart
WebChartViewer1.Image = c.makeWebImage(Chart.PNG);
//include tool tip for the chart
WebChartViewer1.ImageMap = c.getHTMLImageMap("", "", "title='{xLabel}: US${value}K'");

浙公网安备 33010602011771号