tchart example

Posted qiu18359243869

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tchart example相关的知识,希望对你有一定的参考价值。

Random random = new Random();
//
Color SeriesColor;
int SeriesIndex=0;
tChart1.Series.Clear();
Steema.TeeChart.Styles.Points pieSeries;

 


for (int t = 0; t < 6; t++)
{
pieSeries = new Steema.TeeChart.Styles.Points();

tChart1.Series.Add(pieSeries);
tChart1.Series[t].Clear();

if (SeriesIndex==0)
{
SeriesColor=Color.Orchid;
}
else if (SeriesIndex==1)
{
SeriesColor=Color.Purple;
}
else if (SeriesIndex == 2)
{
SeriesColor=Color.Peru;
}
else if (SeriesIndex == 3)
{
SeriesColor=Color.Pink;
}
else if (SeriesIndex==4)
{
SeriesColor = Color.Tan;
}
else if(SeriesIndex==5)
{
SeriesColor = Color.Teal;
}
else if (SeriesIndex == 6)
{
SeriesColor = Color.SteelBlue;
}
else

{
SeriesColor = Color.Thistle;
}

 


//// pieSeries.Pointer.Brush.Color = System.Drawing.Color.Red;
// pieSeries1.Pointer.Brush.ForegroundColor = System.Drawing.Color.Empty;
// pieSeries1.Pointer.HorizSize = 19;
pieSeries.Pointer.InflateMargins = false;
pieSeries.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Sphere;
// pieSeries1.Pointer.VertSize = 19;
this.tChart1.Series[0].Title = "bubble1";
pieSeries.XValues.DataMember = "X";
pieSeries.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
//// this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
//
// tChart1.Panel.Gradient
//
////this.tChart1.Panel.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(234)), ((System.Byte)(234)), ((System.Byte)(255)));
////this.tChart1.Panel.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
////this.tChart1.Panel.Brush.Gradient.Visible = true;
//
// tChart1.Panel.Gradient
//
////this.tChart1.Panel.Gradient.EndColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(234)), ((System.Byte)(234)), ((System.Byte)(255)));
////this.tChart1.Panel.Gradient.StartColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
////this.tChart1.Panel.Gradient.Visible = true;
// this.tChart1.Series.Add(this.bubbleSeries1);

// bubbleSeries1.YValues
//
pieSeries.YValues.DataMember = "Y";
//this.bubbleSeries1.GetPointerStyle += new Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventHandler(this.bubbleSeries1_GetPointerStyle);
//
// SeriesType_Bubble
//

 

 

 

 

for (int z = 0; z < 100; z++)
tChart1.Series[t].Add(1000.0 / (z + random.Next(25)), random.Next(1000), SeriesColor);

SeriesIndex = SeriesIndex + 1;

}

 


//Steema.TeeChart.Styles.Points pieSeries1;
//Steema.TeeChart.Styles.Points pieSeries2;
//Steema.TeeChart.Styles.Points pieSeries3;
//Steema.TeeChart.Styles.Points pieSeries4;
//// pieSeries1.Pointer.Pen.Color
//pieSeries1 = new Steema.TeeChart.Styles.Points();
//pieSeries2 = new Steema.TeeChart.Styles.Points();
//pieSeries3 = new Steema.TeeChart.Styles.Points();
//pieSeries4 = new Steema.TeeChart.Styles.Points();
//tChart1.Series.Clear();

//tChart1.Series.Add(pieSeries1);
//tChart1.Series.Add(pieSeries2);
//tChart1.Series.Add(pieSeries3);
//tChart1.Series.Add(pieSeries4);
//// tChart1.Series.Add(new Steema.TeeChart.Styles.Bubble());
//// tChart1.Series[0].Color = Color.Red;
//tChart1.Series[0].Clear();
//tChart1.Series[1].Clear();
//tChart1.Series[2].Clear();
//tChart1.Series[3].Clear();
//// tChart1.Series[0].Add(123, "ABC", Color.Red);
//// tChart1.Series[0].Add( 456, "DEF", Color.Blue );
//// tChart1.Series[0].Add( 321, "GHI", Color.Green );
////// tChart1.Series[0].Marks.Style = smsValue;
//// this.tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
//// this.tChart1.Location = new System.Drawing.Point(296, 112);
//// this.tChart1.Name = "tChart1";
//// this.tChart1.Size = new System.Drawing.Size(200, 277);
////// this.tChart1.TabIndex = 3;
//pieSeries1.Pointer.Brush.Color = System.Drawing.Color.Red;
//// pieSeries1.Pointer.Brush.ForegroundColor = System.Drawing.Color.Empty;
//// pieSeries1.Pointer.HorizSize = 19;
//pieSeries1.Pointer.InflateMargins = false;
//pieSeries1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Sphere;
//// pieSeries1.Pointer.VertSize = 19;
//this.tChart1.Series[0].Title = "bubble1";
//pieSeries1.XValues.DataMember = "X";
//pieSeries1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
//this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
////
//// tChart1.Panel.Gradient
////
//this.tChart1.Panel.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(234)), ((System.Byte)(234)), ((System.Byte)(255)));
//this.tChart1.Panel.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
//this.tChart1.Panel.Brush.Gradient.Visible = true;
////
//// tChart1.Panel.Gradient
////
//this.tChart1.Panel.Gradient.EndColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(234)), ((System.Byte)(234)), ((System.Byte)(255)));
//this.tChart1.Panel.Gradient.StartColor = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
//this.tChart1.Panel.Gradient.Visible = true;
//// this.tChart1.Series.Add(this.bubbleSeries1);

//// bubbleSeries1.YValues
////
//pieSeries1.YValues.DataMember = "Y";
////this.bubbleSeries1.GetPointerStyle += new Steema.TeeChart.Styles.CustomPoint.GetPointerStyleEventHandler(this.bubbleSeries1_GetPointerStyle);
////
//// SeriesType_Bubble
////

//// tChart1.Series[0].Add(11, 11);
//// tChart1.Series[0].Add(22, 2);
//// tChart1.Series[0].Add(22, 33);
//// tChart1.Series[0].Add(22, 33);
//for (int t = 0; t < 100; t++)
// tChart1.Series[0].Add(1000.0 / (30 + random.Next(25)), random.Next(1000), Color.Orange);
//for (int t = 0; t < 100; t++)
// tChart1.Series[1].Add(1000.0 / (20 + random.Next(25)), random.Next(1000), Color.OliveDrab);

//for (int t = 0; t < 99; t++)
// tChart1.Series[2].Add(1000.0 / (10 + random.Next(25)), random.Next(1000), Color.Red);

//for (int t = 0; t < 1000; t++)
// tChart1.Series[3].Add(1000.0 / (40 + random.Next(25)), random.Next(1000), Color.Orchid);

 

//// tChart1.Series[1].Clear();
//// tChart1.Series[1].Add(1, "A", Color.Red);
//// tChart1.Series[1].Add(4, "D", Color.Blue);
//// tChart1.Series[1].Add(31, "G", Color.Green);
////// tChart1.Series[1].Marks.Style =

//// tChart1.Series.Count() = 7;
////this.tChart1.Aspect.Chart3DPercent = 50;
////this.tChart1.Aspect.Orthogonal = false;
////this.tChart1.Aspect.Perspective = 78;
////this.tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
////this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
////this.tChart1.Aspect.Zoom = 75;

以上是关于tchart example的主要内容,如果未能解决你的问题,请参考以下文章

利用TCHART做分离饼形图

Tchart打印预览

TChart-数据编辑(TChartListBox,TeeCommander)

TChart-图表的滚动与翻译

VB中怎么插入Tchart控件?画曲线用的一个控件!急,在线等

绘图(图表)组件的建议?