private void DoDashGeographic(Chart tChart1, Chart tChart2, Color drawPenColor1) { World world1; tChart1.Series.Add(world1 = new World()); Steema.TeeChart.Styles.CustomBar wbar; wbar = new Steema.TeeChart.Styles.Bar(tChart2.Chart); tChart2.Axes.Bottom.Labels.Angle = 90; tChart2.Axes.Bottom.Labels.Separation = 1; tChart1.Footer.TextAlign = TextAlignment.Start; //map tChart2.Header.Text = AppResources.MarketCost; tChart2.Header.Font.Color = drawPenColor1; tChart2.Header.TextAlign = TextAlignment.Start; tChart2.Header.Font.Size = 14; tChart2.Header.Visible = true; //} wbar.Marks.Visible = false; Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart2, Theme.OperaPalette); world1.Map = Steema.TeeChart.Styles.WorldMapType.Europe15; tChart1.Walls.Visible = false; tChart1.Panel.Transparent = false; //tChart1.GetLegendRect += new GetLegendRectEventHandler(tChart1_GetLegendRect); tChart1.Legend.Visible = true; tChart1.Legend.Font.Size = 12; tChart1.Legend.Symbol.Position = LegendSymbolPosition.Right; world1.ValueFormat = "0.0"; tChart1.Axes.Visible = false; tChart1.Footer.Font.Color = drawPenColor1; tChart1.Footer.Text = AppResources.EUIndex + Utils.NewLine + AppResources.OrganicFood; tChart1.Footer.Font.Size = 13; tChart1.Footer.Visible = true; //world1.StartColor = Color.FromArgb(255,255,128,64); world1.StartColor = Utils.FromArgb(255, 215, 70, 0); world1.EndColor = Utils.FromArgb(255, 255, 233, 0); wbar.Color = Utils.FromArgb(255, 255, 128, 64); // world1.StartColor; int[] territories = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; for (int i = 0; i < world1.Shapes.Count; i++) { if (((String)(world1.Labels[i])) == "Austria") { world1.ZValues[i] = 89; if (territories[0] == 0) { wbar.Add(4.5, (String)(world1.Labels[i])); territories[0] = 1; } } else if (((String)(world1.Labels[i])) == "Denmark") { world1.ZValues[i] = 107; if (territories[1] == 0) { wbar.Add(4, (String)(world1.Labels[i])); territories[1] = 1; } } else if (((String)(world1.Labels[i])) == ("Finland")) { world1.ZValues[i] = 78; if (territories[2] == 0) { wbar.Add(7.5, (String)(world1.Labels[i])); territories[2] = 1; } } else if (((String)(world1.Labels[i])) == ("Luxembourg")) { world1.ZValues[i] = 86; if (territories[3] == 0) { wbar.Add(4.2, (String)(world1.Labels[i])); territories[3] = 1; } } else if (((String)(world1.Labels[i])) == ("Belgium")) { world1.ZValues[i] = 71; if (territories[4] == 0) { wbar.Add(9.1, (String)(world1.Labels[i])); territories[4] = 1; } } else if (((String)(world1.Labels[i])) == ("Netherlands")) { world1.ZValues[i] = 78; if (territories[5] == 0) { wbar.Add(3.9, (String)(world1.Labels[i])); territories[5] = 1; } } else if (((String)(world1.Labels[i])) == ("Germany")) { world1.ZValues[i] = 64; if (territories[6] == 0) { wbar.Add(1.2, (String)(world1.Labels[i])); territories[6] = 1; } } else if (((String)(world1.Labels[i])) == ("Sweden")) { world1.ZValues[i] = 53; if (territories[7] == 0) { wbar.Add(6.0, (String)(world1.Labels[i])); territories[7] = 1; } } else if (((String)(world1.Labels[i])) == ("UK")) { world1.ZValues[i] = 42; if (territories[8] == 0) { wbar.Add(4.7, (String)(world1.Labels[i])); territories[8] = 1; } } else if (((String)(world1.Labels[i])) == ("Ireland")) { world1.ZValues[i] = 24; if (territories[9] == 0) { wbar.Add(-0.2, (String)(world1.Labels[i])); territories[9] = 1; } } else if (((String)(world1.Labels[i])) == ("Italy")) { world1.ZValues[i] = 32; if (territories[10] == 0) { wbar.Add(6.1, (String)(world1.Labels[i])); territories[10] = 1; } } else if (((String)(world1.Labels[i])) == ("France")) { world1.ZValues[i] = 30; if (territories[11] == 0) { wbar.Add(7.9, (String)(world1.Labels[i])); territories[11] = 1; } } else if (((String)(world1.Labels[i])) == ("Spain")) { world1.ZValues[i] = 13; if (territories[12] == 0) { wbar.Add(3.9, (String)(world1.Labels[i])); territories[12] = 1; } } else if (((String)(world1.Labels[i])) == ("Greece")) { world1.ZValues[i] = 7; if (territories[13] == 0) { wbar.Add(2.1, (String)(world1.Labels[i])); territories[13] = 1; } } else if (((String)(world1.Labels[i])) == ("Portugal")) { world1.ZValues[i] = 11; if (territories[14] == 0) { wbar.Add(0.5, (String)(world1.Labels[i])); territories[14] = 1; } } else if (((String)(world1.Labels[i])) == ("Poland")) { world1.ZValues[i] = 1; if (territories[15] == 0) { wbar.Add(1.9, (String)(world1.Labels[i])); territories[15] = 1; } } } world1.Pen.Color = Color.White; world1.Pen.Width = 1; world1.Pen.Visible = true; wbar.Pen.Color = wbar.Color; // Color.White; }
private void DoDashDigital(Chart tChart1, Chart tChart2, Chart tChart3, Color drawPenColor1) { tChart1.Aspect.View3D = false; tChart2.Aspect.View3D = false; tChart3.Aspect.View3D = false; tChart1.Series.Clear(); tChart2.Series.Clear(); tChart3.Series.Clear(); //NumericGauge Chart Steema.TeeChart.Styles.NumericGauge nGauge = new Steema.TeeChart.Styles.NumericGauge(); Random rand = (new Random()); nGauge.Value = 30 + rand.Next(150); tChart1.Panel.MarginTop = 0; tChart1.Panel.MarginBottom = 0; nGauge.Markers[0].Shape.Font.Size = 20; nGauge.Markers[1].Shape.Font.Size = 8; nGauge.Markers[2].Shape.Font.Size = 8; tChart1.Series.Add(nGauge); tChart1.Footer.Font.Color = drawPenColor1; tChart1.Footer.Text = AppResources.SigFrequency + Utils.NewLine + AppResources.BelowSignal; tChart1.Footer.Font.Size = 12; tChart1.Footer.Visible = true; //BarChart Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart2.Chart, Theme.SeawashPalette); Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar(tChart2.Chart); Steema.TeeChart.Styles.Points point = new Steema.TeeChart.Styles.Points(tChart2.Chart); bar.Marks.Visible = false; point.Marks.Visible = false; point.Color = bar.Color; point.Pointer.VertSize = 4; point.Pointer.HorizSize = 8; bar.Gradient.Visible = true; bar.Gradient.EndColor = Utils.FromArgb(0, 255, 255, 255); bar.Gradient.StartColor = bar.Color; //bar.Brush.Transparency = 20; bar.CustomBarWidth = 1 + (point.Pointer.HorizSize / bar.BarWidthPercent * 100); rand = new Random(); for (int i = 0; i < 10; i++) { bar.Add(rand.Next(10)); point.Add(bar.YValues.Last + rand.Next(5)); } tChart2.Axes.Left.Labels.ValueFormat = "#00.000"; tChart2.Axes.Left.SetMinMax(0, point.MaxYValue() + 1); //LinearGauge Chart Steema.TeeChart.Styles.LinearGauge lGauge1 = new Steema.TeeChart.Styles.LinearGauge(tChart3.Chart); Steema.TeeChart.Styles.LinearGauge lGauge2 = new Steema.TeeChart.Styles.LinearGauge(tChart3.Chart); foreach (LinearGauge lGauge in tChart3.Series) { lGauge.Frame.Visible = false; lGauge.Value = 20 + rand.Next(70); tChart3.Axes.Bottom.Increment = 20; tChart3.Axes.Bottom.Labels.Font.Size = 14; lGauge.Hand.VertSize = 50; int index = tChart3.Series.IndexOf(lGauge); lGauge.CustomBounds = new Rectangle(0, index * 60 + 10, 350, 70 + (index * 70)); lGauge.FaceBrush.Transparency = 100; lGauge.Hand.VertSize = 30; lGauge.Hand.Transparency = 0; lGauge.Hand.Gradient.StartColor = Color.Yellow; lGauge.Hand.Gradient.EndColor = Color.Green; lGauge.Hand.Gradient.Visible = true; lGauge.Hand.Brush.Gradient.Visible = true; lGauge.GreenLine.VertSize = 15; lGauge.GreenLine.Gradient.StartColor = Color.Green; lGauge.GreenLine.Gradient.EndColor = Color.Gray; lGauge.RedLine.VertSize = 15; lGauge.RedLine.Gradient.StartColor = Color.Gray; lGauge.RedLine.Gradient.EndColor = Color.Red; } }