console,单图test:
using System;
using System.Collections.Generic;
using System.Text;
using qchart;
namespace test
{
class Program
{
static void Main(string[] args)
{
testPieChart2D();
}
private static void testPieChart2D()
{
PieChart p = new PieChart3D(600,400);
p.startAngle = 15;
p.addPieData(30, "as");
p.addPieData(20, "aqq");
p.addPieData(50, "aqqs");
p.addPieData(80, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
p.addPieData(20, "aswwq");
p.addPieData(160, "ff");
p.createBitmap();
p.saveBitmap("e:\qchart\PieChart2D.jpg");
}
}
}
using System.Collections.Generic;
using System.Text;
using qchart;
namespace test
{
class Program
{
static void Main(string[] args)
{
testPieChart2D();
}
private static void testPieChart2D()
{
PieChart p = new PieChart3D(600,400);
p.startAngle = 15;
p.addPieData(30, "as");
p.addPieData(20, "aqq");
p.addPieData(50, "aqqs");
p.addPieData(80, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
p.addPieData(20, "aswwq");
p.addPieData(160, "ff");
p.createBitmap();
p.saveBitmap("e:\qchart\PieChart2D.jpg");
}
}
}
winform,多图转动演示:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using qchart;
namespace testQchartWin
{
public partial class Form1 : Form
{
int i = 0;
PieChart p = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
p = new PieChart3D(600, 400);
p.addPieData(30, "as");
p.addPieData(20, "aqq");
p.addPieData(50, "aqqs");
p.addPieData(80, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
p.addPieData(20, "aswwq");
p.addPieData(160, "ff");
}
private void timer1_Tick(object sender, EventArgs e)
{
p.startAngle = (i * 15) % 360;
p.createBitmap();
//this.DrawToBitmap(p.bitmap, new Rectangle(0,0,p.width,p.height));
this.CreateGraphics().DrawImage(p.bitmap,new Point(0,0));
p.saveBitmap("e:\qchart\temp\PieChart2D_" + i.ToString() + ".jpg");
i++;
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using qchart;
namespace testQchartWin
{
public partial class Form1 : Form
{
int i = 0;
PieChart p = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
p = new PieChart3D(600, 400);
p.addPieData(30, "as");
p.addPieData(20, "aqq");
p.addPieData(50, "aqqs");
p.addPieData(80, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
//p.addPieData(20, "aswwq");
p.addPieData(20, "aswwq");
p.addPieData(160, "ff");
}
private void timer1_Tick(object sender, EventArgs e)
{
p.startAngle = (i * 15) % 360;
p.createBitmap();
//this.DrawToBitmap(p.bitmap, new Rectangle(0,0,p.width,p.height));
this.CreateGraphics().DrawImage(p.bitmap,new Point(0,0));
p.saveBitmap("e:\qchart\temp\PieChart2D_" + i.ToString() + ".jpg");
i++;
}
}
}
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1645733