예제 #1
0
    private void init()
    {
        ClsData data = new ClsData();

        DataTable dt = data.getDataTable();
        string[] seriesName = new string[] { "Series 1", "Series 2", "Series 3" };

        ClsAjaxChart chart = new ClsAjaxChart();
        /*
        chart.drawChart(chart1, dt, "Line Chart", seriesName, "Year", "Amount", SeriesChartType.Line);
        chart.drawChart(chart2, dt, "Column Chart", seriesName, "Year", "Amount", SeriesChartType.Column);
        chart.drawChart(chart3, dt, "Bar Chart", seriesName, "Year", "Amount", SeriesChartType.Bar);
        chart.drawChart(chart4, dt, "Area Chart", seriesName, "Year", "Amount", SeriesChartType.Area);
        chart.drawChart(chart5, dt, "Pie Chart", seriesName, "Year", "Amount", SeriesChartType.Pie);
        chart.drawChart(chart6, dt, "Stock Chart", seriesName, "Year", "Amount", SeriesChartType.Stock);
        */

        DataTable dt2 = data.getDataTable2();

        dt2.TableName = "Line Chart";
        chart.drawLineChart(LineChart1, dt2);

        dt2.TableName = "Bar Chart";
        chart.drawBarChart(BarChart1, dt2);
    }
예제 #2
0
    private void init()
    {
        this.Title = "Dynamic ASP Chart";
        ClsData data = new ClsData();

        DataTable dt = data.getDataTable();
        string[] seriesName = new string[] { "Series 1", "Series 2", "Series 3" };

        ClsAspChart chart = new ClsAspChart();
        chart.drawChart(chart1, dt, "Line Chart", seriesName, "Year", "Amount", SeriesChartType.Line);

        //panel1.Width = 500;

        for (int i = 0; i < 2; ++i)
        {
            chart.appendDynamicChart(panel1, 500, 300, dt, "Line Chart", seriesName, "Year", "Amount", SeriesChartType.Line);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Column Chart", seriesName, "Year", "Amount", SeriesChartType.Column);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Bar Chart", seriesName, "Year", "Amount", SeriesChartType.Bar);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Area Chart", seriesName, "Year", "Amount", SeriesChartType.Area);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Pie Chart", seriesName, "Year", "Amount", SeriesChartType.Pie);
            chart.appendDynamicChart(panel1, 500, 300, dt, "Stock Chart", seriesName, "Year", "Amount", SeriesChartType.Stock);
        }
    }