Verweise geändert
This commit is contained in:
BIN
3rdPackage/Syncfusion.Chart.Base.dll
Normal file
BIN
3rdPackage/Syncfusion.Chart.Base.dll
Normal file
Binary file not shown.
BIN
3rdPackage/Syncfusion.Chart.Windows.dll
Normal file
BIN
3rdPackage/Syncfusion.Chart.Windows.dll
Normal file
Binary file not shown.
BIN
3rdPackage/Syncfusion.Shared.Base.dll
Normal file
BIN
3rdPackage/Syncfusion.Shared.Base.dll
Normal file
Binary file not shown.
38
SanSystem/FrmLinerChart.Designer.cs
generated
38
SanSystem/FrmLinerChart.Designer.cs
generated
@@ -28,41 +28,25 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.chartControl1 = new Syncfusion.Windows.Forms.Chart.ChartControl();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// chartControl1
|
||||
// button1
|
||||
//
|
||||
this.chartControl1.ChartArea.CursorLocation = new System.Drawing.Point(0, 0);
|
||||
this.chartControl1.ChartArea.CursorReDraw = false;
|
||||
this.chartControl1.EnableYZooming = true;
|
||||
this.chartControl1.IsWindowLess = false;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.chartControl1.Legend.Location = new System.Drawing.Point(485, 75);
|
||||
this.chartControl1.Localize = null;
|
||||
this.chartControl1.Location = new System.Drawing.Point(12, 12);
|
||||
this.chartControl1.MinZoomFactorX = 0.5D;
|
||||
this.chartControl1.MinZoomFactorY = 0.5D;
|
||||
this.chartControl1.Name = "chartControl1";
|
||||
this.chartControl1.PrimaryXAxis.LogLabelsDisplayMode = Syncfusion.Windows.Forms.Chart.LogLabelsDisplayMode.Default;
|
||||
this.chartControl1.PrimaryXAxis.Margin = true;
|
||||
this.chartControl1.PrimaryYAxis.LogLabelsDisplayMode = Syncfusion.Windows.Forms.Chart.LogLabelsDisplayMode.Default;
|
||||
this.chartControl1.PrimaryYAxis.Margin = true;
|
||||
this.chartControl1.Size = new System.Drawing.Size(776, 357);
|
||||
this.chartControl1.TabIndex = 0;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.chartControl1.Title.Name = "Default";
|
||||
this.button1.Location = new System.Drawing.Point(90, 67);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(210, 112);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "button1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// FrmLinerChart
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.chartControl1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Name = "FrmLinerChart";
|
||||
this.Text = "FrmLinerChart";
|
||||
this.ResumeLayout(false);
|
||||
@@ -71,6 +55,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private Syncfusion.Windows.Forms.Chart.ChartControl chartControl1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
||||
@@ -17,18 +17,24 @@ namespace SanSystem
|
||||
public FrmLinerChart()
|
||||
{
|
||||
InitializeComponent();
|
||||
ChartAxis axis = chartControl1.PrimaryYAxis;
|
||||
|
||||
}
|
||||
|
||||
public void SaveChart()
|
||||
{
|
||||
Size size = new Size(800, 400);
|
||||
ChartControl chartControl = new ChartControl();
|
||||
chartControl.Size = size;
|
||||
|
||||
ChartAxis axis = chartControl.PrimaryYAxis;
|
||||
ChartAxis axis0 = new ChartAxis(ChartOrientation.Vertical);
|
||||
ChartAxis axis1 = new ChartAxis(ChartOrientation.Vertical);
|
||||
|
||||
ChartAxisLayout layout1 = new ChartAxisLayout();
|
||||
ChartAxisLayout layout2 = new ChartAxisLayout();
|
||||
|
||||
chartControl1.Axes.Add(axis0);
|
||||
chartControl1.Axes.Add(axis1);
|
||||
|
||||
|
||||
|
||||
chartControl.Axes.Add(axis0);
|
||||
chartControl.Axes.Add(axis1);
|
||||
|
||||
layout1.Spacing = 12;
|
||||
layout2.Spacing = 12;
|
||||
@@ -36,8 +42,8 @@ namespace SanSystem
|
||||
layout2.Axes.Add(axis0);
|
||||
layout2.Axes.Add(axis1);
|
||||
|
||||
chartControl1.ChartArea.YLayouts.Add(layout1);
|
||||
chartControl1.ChartArea.YLayouts.Add(layout2);
|
||||
chartControl.ChartArea.YLayouts.Add(layout1);
|
||||
chartControl.ChartArea.YLayouts.Add(layout2);
|
||||
|
||||
ChartSeries temperaturChart = new ChartSeries("Temperatur", ChartSeriesType.Line);
|
||||
ChartSeries druckChart = new ChartSeries("Druck", ChartSeriesType.Line);
|
||||
@@ -48,13 +54,13 @@ namespace SanSystem
|
||||
{
|
||||
string[] parts = pars.Split(',');
|
||||
if (parts[0].Equals("Group1") || parts[1].Equals("(END)")) continue;
|
||||
double temperatur = double.Parse(parts[1].Replace('.',','));
|
||||
double temperatur = double.Parse(parts[1].Replace('.', ','));
|
||||
double druck = double.Parse(parts[2].Replace('.', ','));
|
||||
|
||||
temperaturChart.Points.Add(counter, temperatur);
|
||||
druckChart.Points.Add(counter, druck);
|
||||
counter++;
|
||||
|
||||
|
||||
}
|
||||
temperaturChart.YAxis = axis;
|
||||
druckChart.YAxis = axis0;
|
||||
@@ -65,22 +71,22 @@ namespace SanSystem
|
||||
axis0.Title = "[bar]";
|
||||
axis0.TitleFont = new Font("Segeo UI", 14F);
|
||||
|
||||
chartControl1.LegendsPlacement = ChartPlacement.Outside;
|
||||
chartControl1.LegendPosition = ChartDock.Bottom;
|
||||
chartControl1.LegendAlignment = ChartAlignment.Center;
|
||||
chartControl1.Title.Visible = false;
|
||||
|
||||
chartControl.LegendsPlacement = ChartPlacement.Outside;
|
||||
chartControl.LegendPosition = ChartDock.Bottom;
|
||||
chartControl.LegendAlignment = ChartAlignment.Center;
|
||||
chartControl.Title.Visible = false;
|
||||
|
||||
ChartAxis chartAxis = new ChartAxis();
|
||||
chartAxis.Orientation = ChartOrientation.Horizontal;
|
||||
chartAxis.Range = new MinMaxInfo(0, 6, 1);
|
||||
chartAxis.DrawGrid = false;
|
||||
chartAxis.LineType.Width = 1F;
|
||||
chartAxis.LineType.ForeColor = Color.Black;
|
||||
chartControl1.Axes.Add(chartAxis);
|
||||
|
||||
chartControl1.Series.Add(temperaturChart);
|
||||
chartControl1.Series.Add(druckChart);
|
||||
chartControl1.Skins = Skins.Metro;
|
||||
chartControl.Axes.Add(chartAxis);
|
||||
|
||||
chartControl.Series.Add(temperaturChart);
|
||||
chartControl.Series.Add(druckChart);
|
||||
chartControl.Skins = Skins.Metro;
|
||||
|
||||
|
||||
axis1.OpposedPosition = true;
|
||||
@@ -88,7 +94,12 @@ namespace SanSystem
|
||||
axis0.EdgeLabelsDrawingMode = ChartAxisEdgeLabelsDrawingMode.Shift;
|
||||
axis1.EdgeLabelsDrawingMode = ChartAxisEdgeLabelsDrawingMode.Shift;
|
||||
|
||||
chartControl1.SaveImage("./temp.jpg");
|
||||
chartControl.SaveImage("./temp.jpg");
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveChart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user