public MySelectRange(NChart chart, double begin, double end, Color c) { this._chart = chart; this._end = Math.Max(begin, end); this._begin = Math.Min(begin, end); this._LineColor = c; this._line1 = chart.Axis(StandardAxis.PrimaryX).ConstLines.Add(); this._line1.StrokeStyle.Color = this._LineColor; this._line1.StrokeStyle.Width = new NLength(1.5f); this._line1.FillStyle = new NColorFillStyle(new NArgbColor(125, this._LineColor)); this._line1.Text = "点击鼠标左键进行拖动"; this._line1.Value = this._begin; this._line2 = chart.Axis(StandardAxis.PrimaryX).ConstLines.Add(); this._line2.StrokeStyle.Color = this._LineColor; this._line2.StrokeStyle.Width = new NLength(1.5f); this._line2.FillStyle = new NColorFillStyle(new NArgbColor(125, this._LineColor)); this._line2.Text = "点击鼠标左键进行拖动"; this._line2.Value = this._end; // configure the first vertical section _section = new NScaleSectionStyle(); _section.Range = new NRange1DD(begin, end); _section.SetShowAtWall(ChartWallType.Back, true); _section.SetShowAtWall(ChartWallType.Left, true); _section.RangeFillStyle = new NColorFillStyle(_LineColor); _section.MajorGridStrokeStyle = new NStrokeStyle(_LineColor); _section.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkBlue); _section.MinorTickStrokeStyle = new NStrokeStyle(1, _LineColor, LinePattern.Dot, 0, 2); _standardScale = (NStandardScaleConfigurator)_chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator; _standardScale.Sections.Add(_section); //labelStyle = new NTextStyle(); //labelStyle.FillStyle = new NGradientFillStyle(Color.Blue, Color.DarkBlue); //labelStyle.FontStyle.Style = FontStyle.Bold; //m_FirstVerticalSection.LabelTextStyle = labelStyle; this._line1.ValueChanged += new EventHandler(_line_ValueChanged); this._line2.ValueChanged += new EventHandler(_line_ValueChanged); }
private void InitSections(NGaugePanel gaugePanel) { NGaugeAxis axis = (NGaugeAxis)gaugePanel.Axes[0]; NStandardScaleConfigurator scale = (NStandardScaleConfigurator)axis.ScaleConfigurator; // init text style for regular labels scale.LabelStyle.TextStyle.FillStyle = new NColorFillStyle(Color.White); scale.LabelStyle.TextStyle.FontStyle = new NFontStyle("Arial", 10, FontStyle.Bold); // init ticks scale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); scale.MinTickDistance = new NLength(20); scale.MinorTickCount = 1; scale.SetPredefinedScaleStyle(PredefinedScaleStyle.Scientific); // create sections NScaleSectionStyle blueSection = new NScaleSectionStyle(); blueSection.Range = new NRange1DD(0, 20); blueSection.SetShowAtWall(ChartWallType.Back, true); blueSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(50, Color.Blue)); blueSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Blue); blueSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkBlue); blueSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Blue, LinePattern.Dot, 0, 2); NTextStyle labelStyle = new NTextStyle(); labelStyle.FillStyle = new NColorFillStyle(Color.Blue); labelStyle.FontStyle = new NFontStyle("Arial", 10, FontStyle.Bold); blueSection.LabelTextStyle = labelStyle; scale.Sections.Add(blueSection); NScaleSectionStyle redSection = new NScaleSectionStyle(); redSection.Range = new NRange1DD(80, 100); redSection.SetShowAtWall(ChartWallType.Back, true); redSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(50, Color.Red)); redSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Red); redSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkRed); redSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Red, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NColorFillStyle(Color.Red); labelStyle.FontStyle = new NFontStyle("Arial", 10, FontStyle.Bold); redSection.LabelTextStyle = labelStyle; scale.Sections.Add(redSection); }
private void UpdateScale() { NAxis primaryY = nChartControl1.Charts[0].Axis(StandardAxis.PrimaryY); NRange1DD hotZoneRange = new NRange1DD(Convert.ToDouble(HotZoneBeginDropDownList.SelectedValue), 100); NRange1DD coldZoneRange = new NRange1DD(0, Convert.ToDouble(ColdZoneEndDropDownList.SelectedValue)); NScaleSectionStyle hotZoneSection = new NScaleSectionStyle(); hotZoneSection.Range = hotZoneRange; hotZoneSection.LabelTextStyle = new NTextStyle(new NFontStyle(), Color.Red); hotZoneSection.MajorTickStrokeStyle = new NStrokeStyle(1, Color.Red); hotZoneSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(50, Color.Red)); hotZoneSection.SetShowAtWall(ChartWallType.Back, true); NScaleSectionStyle coldZoneSection = new NScaleSectionStyle(); coldZoneSection.Range = coldZoneRange; coldZoneSection.LabelTextStyle = new NTextStyle(new NFontStyle(), Color.Blue); coldZoneSection.MajorTickStrokeStyle = new NStrokeStyle(1, Color.Blue); coldZoneSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(50, Color.Blue)); coldZoneSection.SetShowAtWall(ChartWallType.Back, true); NStandardScaleConfigurator configurator = (NStandardScaleConfigurator)primaryY.ScaleConfigurator; configurator.Sections.Clear(); configurator.Sections.Add(hotZoneSection); configurator.Sections.Add(coldZoneSection); // first use the scale configurator to output some definition primaryY.SynchronizeScaleWithConfigurator = true; primaryY.InvalidateScale(); primaryY.UpdateScale(); primaryY.SynchronizeScaleWithConfigurator = false; // manually program the scale NScaleLevel scaleLevel; NCustomScaleDecorator customScaleDecorator; NScaleRangeDecorationAnchor anchor; NScaleLevelSeparator separator; NValueScaleLabel label; NNumericDoubleStepRangeSampler rangeSampler; NClampedRangeSampler clampedRangeSampler; NScaleTickFactory tickFactory; NSampledScaleDecorator sampledDecorator;; // create the hot zone // add a level separator scaleLevel = new NScaleLevel(); customScaleDecorator = new NCustomScaleDecorator(); anchor = new NScaleRangeDecorationAnchor(hotZoneRange); separator = new NScaleLevelSeparator(0, anchor, ScaleLevelShape.Line, null, new NStrokeStyle(1, Color.Red), new NLength(0), new NLength(0), new NLength(0), new NLength(0), null, null, null, false); customScaleDecorator.Decorations.Add(separator); // create a value scale label label = new NValueScaleLabel(); label.Text = "Hot Zone"; label.Anchor = new NRulerValueDecorationAnchor(HorzAlign.Right, new NLength(0)); label.Offset = new NLength(6, NGraphicsUnit.Point); label.Style.TextStyle.FillStyle = new NColorFillStyle(Color.Red); label.Style.ContentAlignment = ContentAlignment.TopRight; label.Style.Angle = new NScaleLabelAngle(ScaleLabelAngleMode.View, 90, true); customScaleDecorator.Decorations.Add(label); scaleLevel.Decorators.Add(customScaleDecorator); // add a some ticks rangeSampler = new NNumericDoubleStepRangeSampler(new NCustomNumericStepProvider(5)); rangeSampler.UseCustomOrigin = true; rangeSampler.CustomOrigin = 0; clampedRangeSampler = new NClampedRangeSampler(rangeSampler, hotZoneRange); tickFactory = new NScaleTickFactory(0, ScaleTickShape.Line, new NLength(0), new NSizeL(new NLength(1), new NLength(5, NGraphicsUnit.Point)), new NConstValueProvider(new NColorFillStyle(Color.Red)), new NConstValueProvider(new NStrokeStyle(1, Color.Red)), HorzAlign.Left); sampledDecorator = new NSampledScaleDecorator(clampedRangeSampler, tickFactory); scaleLevel.Decorators.Add(sampledDecorator); // create the cold zone // add a level separator customScaleDecorator = new NCustomScaleDecorator(); anchor = new NScaleRangeDecorationAnchor(coldZoneRange); separator = new NScaleLevelSeparator(0, anchor, ScaleLevelShape.Line, null, new NStrokeStyle(1, Color.Blue)); customScaleDecorator.Decorations.Add(separator); // create a value scale label label = new NValueScaleLabel(); label.Text = "Cold Zone"; label.Anchor = new NRulerValueDecorationAnchor(HorzAlign.Left, new NLength(0)); label.Offset = new NLength(6, NGraphicsUnit.Point); label.Style.TextStyle.FillStyle = new NColorFillStyle(Color.Blue); label.Style.ContentAlignment = ContentAlignment.TopLeft; label.Style.Angle = new NScaleLabelAngle(ScaleLabelAngleMode.View, 90, true); customScaleDecorator.Decorations.Add(label); scaleLevel.Decorators.Add(customScaleDecorator); // add a some ticks rangeSampler = new NNumericDoubleStepRangeSampler(new NCustomNumericStepProvider(5)); clampedRangeSampler = new NClampedRangeSampler(rangeSampler, coldZoneRange); tickFactory = new NScaleTickFactory(0, ScaleTickShape.Line, new NLength(0), new NSizeL(new NLength(1), new NLength(5, NGraphicsUnit.Point)), new NConstValueProvider(new NColorFillStyle(Color.Red)), new NConstValueProvider(new NStrokeStyle(1, Color.Blue)), HorzAlign.Left); sampledDecorator = new NSampledScaleDecorator(clampedRangeSampler, tickFactory); scaleLevel.Decorators.Add(sampledDecorator); primaryY.Scale.Levels.Add(scaleLevel); UpdateData(hotZoneRange, coldZoneRange); }
protected void Page_Load(object sender, System.EventArgs e) { nChartControl1.BackgroundStyle.FrameStyle.Visible = false; // set a chart title NLabel header = nChartControl1.Labels.AddHeader("Axis Sections"); header.TextStyle.FontStyle = new NFontStyle("Times New Roman", 14, FontStyle.Italic); header.TextStyle.ShadowStyle.Type = ShadowType.LinearBlur; header.ContentAlignment = ContentAlignment.BottomRight; header.Location = new NPointL( new NLength(2, NRelativeUnit.ParentPercentage), new NLength(2, NRelativeUnit.ParentPercentage)); m_Chart = (NCartesianChart)nChartControl1.Charts[0]; m_Chart.BoundsMode = BoundsMode.Stretch; m_Chart.Location = new NPointL( new NLength(2, NRelativeUnit.ParentPercentage), new NLength(12, NRelativeUnit.ParentPercentage)); m_Chart.Size = new NSizeL( new NLength(93, NRelativeUnit.ParentPercentage), new NLength(85, NRelativeUnit.ParentPercentage)); // create a point series NPointSeries point = (NPointSeries)m_Chart.Series.Add(SeriesType.Point); point.Name = "Point Series"; point.Legend.Mode = SeriesLegendMode.None; point.DataLabelStyle.Visible = false; point.MarkerStyle.Visible = false; point.Size = new NLength(5, NGraphicsUnit.Point); point.Values.FillRandom(Random, 30); point.ShadowStyle.Type = ShadowType.GaussianBlur; point.ShadowStyle.Offset = new NPointL(3, 3); point.ShadowStyle.FadeLength = new NLength(5); point.ShadowStyle.Color = Color.FromArgb(55, 0, 0, 0); point.InflateMargins = true; // tell the x axis to display major and minor grid lines NLinearScaleConfigurator linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = linearScale; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorGridStyle.LineStyle.Pattern = LinePattern.Dot; linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorTickCount = 1; // tell the y axis to display major and minor grid lines linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator = linearScale; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorGridStyle.LineStyle.Pattern = LinePattern.Dot; linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorTickCount = 1; NTextStyle labelStyle; // configure the first horizontal section m_FirstHorizontalSection = new NScaleSectionStyle(); m_FirstHorizontalSection.Range = new NRange1DD(2, 8); m_FirstHorizontalSection.SetShowAtWall(ChartWallType.Back, true); m_FirstHorizontalSection.SetShowAtWall(ChartWallType.Floor, true); m_FirstHorizontalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(125, Color.Red)); m_FirstHorizontalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Red); m_FirstHorizontalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkRed); m_FirstHorizontalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Red, LinePattern.Dot, 0, 1); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant1, Color.Red, Color.DarkRed); labelStyle.FontStyle.Style = FontStyle.Bold; m_FirstHorizontalSection.LabelTextStyle = labelStyle; // configure the second horizontal section m_SecondHorizontalSection = new NScaleSectionStyle(); m_SecondHorizontalSection.Range = new NRange1DD(14, 18); m_SecondHorizontalSection.SetShowAtWall(ChartWallType.Back, true); m_SecondHorizontalSection.SetShowAtWall(ChartWallType.Floor, true); m_SecondHorizontalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(125, Color.Green)); m_SecondHorizontalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Green); m_SecondHorizontalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkGreen); m_SecondHorizontalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Green, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant1, Color.Green, Color.DarkGreen); labelStyle.FontStyle.Style = FontStyle.Bold; m_SecondHorizontalSection.LabelTextStyle = labelStyle; // configure the first vertical section m_FirstVerticalSection = new NScaleSectionStyle(); m_FirstVerticalSection.Range = new NRange1DD(20, 40); m_FirstVerticalSection.SetShowAtWall(ChartWallType.Back, true); m_FirstVerticalSection.SetShowAtWall(ChartWallType.Left, true); m_FirstVerticalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(125, Color.Blue)); m_FirstVerticalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Blue); m_FirstVerticalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkBlue); m_FirstVerticalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Blue, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant1, Color.Blue, Color.DarkBlue); labelStyle.FontStyle.Style = FontStyle.Bold; m_FirstVerticalSection.LabelTextStyle = labelStyle; // configure the second vertical section m_SecondVerticalSection = new NScaleSectionStyle(); m_SecondVerticalSection.Range = new NRange1DD(70, 90); m_SecondVerticalSection.SetShowAtWall(ChartWallType.Back, true); m_SecondVerticalSection.SetShowAtWall(ChartWallType.Left, true); m_SecondVerticalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(125, Color.Orange)); m_SecondVerticalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Orange); m_SecondVerticalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkOrange); m_SecondVerticalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Orange, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(GradientStyle.Horizontal, GradientVariant.Variant1, Color.Orange, Color.DarkOrange); labelStyle.FontStyle.Style = FontStyle.Bold; m_SecondVerticalSection.LabelTextStyle = labelStyle; if (!Page.IsPostBack) { ShowFirstHorizontalSectionCheck.Checked = true; ShowSecondHorizontalSectionCheck.Checked = true; ShowFirstVerticalSectionCheck.Checked = true; ShowSecondVerticalSectionCheck.Checked = true; } UpdateSections(); }
public override void Initialize() { base.Initialize(); // set a chart title NLabel title = nChartControl1.Labels.AddHeader("Axis Sections"); title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic); title.ContentAlignment = ContentAlignment.BottomCenter; title.Location = new NPointL(new NLength(50, NRelativeUnit.ParentPercentage), new NLength(2, NRelativeUnit.ParentPercentage)); // no legend nChartControl1.Legends.Clear(); m_Chart = (NCartesianChart)nChartControl1.Charts[0]; m_Chart.BoundsMode = BoundsMode.Stretch; // create a point series NPointSeries point = (NPointSeries)m_Chart.Series.Add(SeriesType.Point); point.Name = "Point Series"; point.DataLabelStyle.Visible = false; point.MarkerStyle.Visible = false; point.Size = new NLength(5, NGraphicsUnit.Point); point.Values.FillRandom(Random, 30); point.ShadowStyle.Type = ShadowType.GaussianBlur; point.ShadowStyle.Offset = new NPointL(3, 3); point.ShadowStyle.FadeLength = new NLength(5); point.ShadowStyle.Color = Color.FromArgb(55, 0, 0, 0); point.InflateMargins = true; // tell the x axis to display major and minor grid lines NLinearScaleConfigurator linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = linearScale; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorGridStyle.LineStyle.Pattern = LinePattern.Dot; linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorTickCount = 1; // tell the y axis to display major and minor grid lines linearScale = new NLinearScaleConfigurator(); m_Chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator = linearScale; linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorGridStyle.LineStyle.Pattern = LinePattern.Dot; linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Back, true); linearScale.MinorGridStyle.SetShowAtWall(ChartWallType.Floor, true); linearScale.MinorTickCount = 1; NTextStyle labelStyle; // configure the first horizontal section m_FirstHorizontalSection = new NScaleSectionStyle(); m_FirstHorizontalSection.Range = new NRange1DD(2, 8); m_FirstHorizontalSection.SetShowAtWall(ChartWallType.Back, true); m_FirstHorizontalSection.SetShowAtWall(ChartWallType.Floor, true); m_FirstHorizontalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(60, Color.Red)); m_FirstHorizontalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Red); m_FirstHorizontalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkRed); m_FirstHorizontalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Red, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(Color.Red, Color.DarkRed); labelStyle.FontStyle.Style = FontStyle.Bold; m_FirstHorizontalSection.LabelTextStyle = labelStyle; // configure the second horizontal section m_SecondHorizontalSection = new NScaleSectionStyle(); m_SecondHorizontalSection.Range = new NRange1DD(14, 18); m_SecondHorizontalSection.SetShowAtWall(ChartWallType.Back, true); m_SecondHorizontalSection.SetShowAtWall(ChartWallType.Floor, true); m_SecondHorizontalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(60, Color.Green)); m_SecondHorizontalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Green); m_SecondHorizontalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkGreen); m_SecondHorizontalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Green, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(Color.Green, Color.DarkGreen); labelStyle.FontStyle.Style = FontStyle.Bold; m_SecondHorizontalSection.LabelTextStyle = labelStyle; // configure the first vertical section m_FirstVerticalSection = new NScaleSectionStyle(); m_FirstVerticalSection.Range = new NRange1DD(20, 40); m_FirstVerticalSection.SetShowAtWall(ChartWallType.Back, true); m_FirstVerticalSection.SetShowAtWall(ChartWallType.Left, true); m_FirstVerticalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(60, Color.Blue)); m_FirstVerticalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Blue); m_FirstVerticalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkBlue); m_FirstVerticalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Blue, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(Color.Blue, Color.DarkBlue); labelStyle.FontStyle.Style = FontStyle.Bold; m_FirstVerticalSection.LabelTextStyle = labelStyle; // configure the second vertical section m_SecondVerticalSection = new NScaleSectionStyle(); m_SecondVerticalSection.Range = new NRange1DD(70, 90); m_SecondVerticalSection.SetShowAtWall(ChartWallType.Back, true); m_SecondVerticalSection.SetShowAtWall(ChartWallType.Left, true); m_SecondVerticalSection.RangeFillStyle = new NColorFillStyle(Color.FromArgb(60, Color.Orange)); m_SecondVerticalSection.MajorGridStrokeStyle = new NStrokeStyle(Color.Orange); m_SecondVerticalSection.MajorTickStrokeStyle = new NStrokeStyle(Color.DarkOrange); m_SecondVerticalSection.MinorTickStrokeStyle = new NStrokeStyle(1, Color.Orange, LinePattern.Dot, 0, 2); labelStyle = new NTextStyle(); labelStyle.FillStyle = new NGradientFillStyle(Color.Orange, Color.DarkOrange); labelStyle.FontStyle.Style = FontStyle.Bold; m_SecondVerticalSection.LabelTextStyle = labelStyle; ShowFirstHorizontalSectionCheck.Checked = true; ShowSecondHorizontalSectionCheck.Checked = true; ShowFirstVerticalSectionCheck.Checked = true; ShowSecondVerticalSectionCheck.Checked = true; }