|
NGChartSamples
Samples of the library usage.
NG Chart usage samplesIn addition, you can use unit tests as a guide. Line chartsView example of line chart with chart title Code to generate the chart (LineChart type intoduced in v0.5): LineChart chart = new LineChart(new ChartSize(200, 125),
new ChartData(new int[] { 0, 1, 25, 26, 51, 52, 61, 1 }));
chart.Colors = new ChartColors(Color.DodgerBlue);
chart.Title = new ChartTitle("Line chart\nsimple one", Color.Olive, 10);
chart.LineStyles = new LineStyles(new LineStyle(3, 7, 1));Pie charts2D pie chartCode to generate the chart: PieChart chart = new PieChart(PieChartType.Pie2D,
new ChartSize(300, 200),
new ChartData(new int[] { 25, 28, 12 })
);3D pie chartCode to generate the chart: PieChart chart = new PieChart(PieChartType.Pie3D,
new ChartSize(400, 150),
new ChartData(new int[] { 25, 28, 53 })
);
// set colors
Color[] colors = new Color[] { Color.DodgerBlue, Color.Orchid, Color.DarkSalmon };
chart.Colors = new ChartColors(colors);
// generate labels from color names
string[] colorNames = Array.ConvertAll<Color, string>(colors,
delegate(Color color)
{
return color.ToKnownColor().ToString();
});Bar chartsVertical grouped bar chart with legendCode to generate the chart: BarChart chart = new BarChart(BarsType.Grouped, BarsDirection.Vertical,
new ChartSize(420, 125),
new ChartData(new int[][]
{
new int[] { 20, 1, 25, 26, 51 },
new int[] { 7, 12, 60, 57, 4 }
})
);
chart.Colors = new ChartColors(new Color[] { Color.DodgerBlue, Color.YellowGreen });
chart.Legend = new ChartLegend(new string[] {"Winter", "Summer"});Horizontal stacked bar chart with legend and custom bar sizesCode to generate the chart: BarChart chart = new BarChart(BarsType.Stacked, BarsDirection.Horizontal,
new ChartSize(350, 140),
new ChartData(new int[][]
{
new int[] { 20, 1, 25, 26, 51 },
new int[] { 7, 12, 60, 57, 4 }
})
);
chart.Colors = new ChartColors(new Color[] { Color.DodgerBlue, Color.YellowGreen });
chart.Legend = new ChartLegend(new string[] { "Winter", "Summer" });
chart.BarChartSize = new BarChartSize(18, 1);QR codesCode to generate the QR codes: QRCodes chart = new QRCodes(new ChartSize(150, 150), "Hello world"); |
Sign in to add a comment
I tried to add the reference dll in VS.Net 2003 /1.1 Frameworks. I get an error. Can anyone tell me if it is possible to add 2.0 compiled dll's to 1.1. Thank you in advance.