public override void Initialize()
        {
            base.Initialize();

            nChartControl1.Panels.Clear();

            // set a chart title
            NLabel header = new NLabel("Range Timeline Scale Advanced<br/><font size = '9pt'>Demonstrates how to use a timeline scale to show date/time information on the X axis</font>");

            header.DockMode             = PanelDockMode.Top;
            header.Margins              = new NMarginsL(0, 10, 0, 10);
            header.TextStyle.TextFormat = TextFormat.XML;
            header.TextStyle.FontStyle  = new NFontStyle("Times New Roman", 18, FontStyle.Italic);
            header.ContentAlignment     = ContentAlignment.BottomRight;
            header.Location             = new NPointL(new NLength(2, NRelativeUnit.ParentPercentage), new NLength(2, NRelativeUnit.ParentPercentage));
            nChartControl1.Panels.Add(header);

            // setup chart
            m_Chart = new NCartesianChart();
            nChartControl1.Panels.Add(m_Chart);
            m_Chart.DockMode = PanelDockMode.Fill;
            m_Chart.Margins  = new NMarginsL(10, 0, 10, 10);
            m_Chart.Projection.SetPredefinedProjection(PredefinedProjection.Orthogonal);
            m_Chart.LightModel.EnableLighting         = false;
            m_Chart.Axis(StandardAxis.Depth).Visible  = false;
            m_Chart.Wall(ChartWallType.Floor).Visible = false;
            m_Chart.Wall(ChartWallType.Left).Visible  = false;
            m_Chart.BoundsMode = BoundsMode.Stretch;
            m_Chart.Height     = 40;

            m_Chart.Location = new NPointL(new NLength(10, NRelativeUnit.ParentPercentage), new NLength(15, NRelativeUnit.ParentPercentage));
            m_Chart.Size     = new NSizeL(new NLength(80, NRelativeUnit.ParentPercentage), new NLength(75, NRelativeUnit.ParentPercentage));

            NRangeSelection rangeSelection = new NRangeSelection();

            rangeSelection.VerticalValueSnapper = new NAxisRulerMinMaxSnapper();
            m_Chart.RangeSelections.Add(rangeSelection);

            // setup X axis
            NAxis axis = m_Chart.Axis(StandardAxis.PrimaryX);

            axis.ScrollBar.Visible = true;
            NRangeTimelineScaleConfigurator timeLineScale = new NRangeTimelineScaleConfigurator();

            timeLineScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true);
            timeLineScale.SecondRow.GridStyle.SetShowAtWall(ChartWallType.Back, true);
            timeLineScale.ThirdRow.GridStyle.SetShowAtWall(ChartWallType.Back, true);
            axis.ScaleConfigurator = timeLineScale;

            // setup primary Y axis
            axis = m_Chart.Axis(StandardAxis.PrimaryY);
            NLinearScaleConfigurator linearScale = (NLinearScaleConfigurator)axis.ScaleConfigurator;

            linearScale.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot;
            linearScale.MajorGridStyle.SetShowAtWall(ChartWallType.Left, false);
            linearScale.InnerMajorTickStyle.Length = new NLength(0);

            // add interlaced stripe
            NScaleStripStyle stripStyle = new NScaleStripStyle();

            stripStyle.FillStyle = new NColorFillStyle(Color.Beige);
            stripStyle.SetShowAtWall(ChartWallType.Back, true);
            stripStyle.SetShowAtWall(ChartWallType.Left, true);
            stripStyle.Interlaced = true;
            linearScale.StripStyles.Add(stripStyle);

            // Setup the stock series
            m_Stock = (NStockSeries)m_Chart.Series.Add(SeriesType.Stock);
            m_Stock.DataLabelStyle.Visible = false;
            m_Stock.CandleStyle            = CandleStyle.Stick;
            m_Stock.CandleWidth            = new NLength(0.5f, NRelativeUnit.ParentPercentage);
            m_Stock.UpStrokeStyle.Color    = Color.RoyalBlue;
            m_Stock.Legend.Mode            = SeriesLegendMode.None;
            m_Stock.CloseValues.Name       = "close";
            m_Stock.UseXValues             = true;

            // configure interactivity
            nChartControl1.Controller.Tools.Add(new NPanelSelectorTool());
            nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
            nChartControl1.Controller.Tools.Add(new NDataZoomTool());

            // generate some data
            MonthlyDataButton_Click(null, null);

            // init form controls
            FirstRowModeComboBox.FillFromEnum(typeof(TimelineScaleRowTickMode));
            FirstRowModeComboBox.SelectedIndex = (int)TimelineScaleRowTickMode.AutoMinDistance;
            FirstRowUnitComboBox.FillFromEnum(typeof(DateTimeUnit));
            FirstRowUnitComboBox.SelectedIndex = 0;
            FirstRowUnitCountUpDown.Value      = 1;
            FirstRowVisibleCheckBox.Checked    = true;

            SecondRowModeComboBox.FillFromEnum(typeof(TimelineScaleRowTickMode));
            SecondRowModeComboBox.SelectedIndex = (int)TimelineScaleRowTickMode.AutoMinDistance;
            SecondRowUnitComboBox.FillFromEnum(typeof(DateTimeUnit));
            SecondRowUnitComboBox.SelectedIndex = 0;
            SecondRowUnitCountUpDown.Value      = 1;
            SecondRowVisibleCheckBox.Checked    = true;

            ThirdRowModeComboBox.FillFromEnum(typeof(TimelineScaleRowTickMode));
            ThirdRowModeComboBox.SelectedIndex = (int)TimelineScaleRowTickMode.AutoMinDistance;
            ThirdRowUnitComboBox.FillFromEnum(typeof(DateTimeUnit));
            ThirdRowUnitComboBox.SelectedIndex = 0;
            ThirdRowUnitCountUpDown.Value      = 1;
            ThirdRowVisibleCheckBox.Checked    = true;

            TopLevelPaddingUpDown.Value    = (decimal)2;
            BottomLevelPaddingUpDown.Value = (decimal)2;
        }
        public override void Initialize()
        {
            base.Initialize();

            // set a chart title
            NLabel title = nChartControl1.Labels.AddHeader("Axis Labels");

            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));

            m_Chart            = nChartControl1.Charts[0];
            m_Chart.BoundsMode = BoundsMode.Stretch;

            NStandardScaleConfigurator scaleConfiguratorY = (NStandardScaleConfigurator)m_Chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator;

            scaleConfiguratorY.MajorTickMode = MajorTickMode.AutoMaxCount;
            scaleConfiguratorY.MaxTickCount  = 50;

            // add interlaced stripe
            NScaleStripStyle stripStyle = new NScaleStripStyle(new NColorFillStyle(Color.Beige), null, true, 0, 0, 1, 1);

            stripStyle.SetShowAtWall(ChartWallType.Back, true);
            stripStyle.SetShowAtWall(ChartWallType.Left, true);
            stripStyle.Interlaced = true;
            scaleConfiguratorY.StripStyles.Add(stripStyle);

            NStandardScaleConfigurator scaleConfiguratorX = (NStandardScaleConfigurator)m_Chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator;

            scaleConfiguratorX.MajorTickMode = MajorTickMode.AutoMaxCount;

            scaleConfiguratorX.AutoLabels = false;
            scaleConfiguratorX.Labels.Add("France");
            scaleConfiguratorX.Labels.Add("Italy");
            scaleConfiguratorX.Labels.Add("Germany");
            scaleConfiguratorX.Labels.Add("Norway");
            scaleConfiguratorX.Labels.Add("Spain");
            scaleConfiguratorX.Labels.Add("Belgium");
            scaleConfiguratorX.Labels.Add("Greece");
            scaleConfiguratorX.Labels.Add("Austria");
            scaleConfiguratorX.Labels.Add("Sweden");
            scaleConfiguratorX.Labels.Add("Finland");
            scaleConfiguratorX.Labels.Add("Poland");
            scaleConfiguratorX.Labels.Add("Denmark");

            NBarSeries series1 = (NBarSeries)m_Chart.Series.Add(SeriesType.Bar);

            series1.FillStyle = new NColorFillStyle(Color.Crimson);
            series1.Name      = "Product A";
            series1.DataLabelStyle.Visible = false;
            GenerateData(series1.Values, 12);

            NBarSeries series2 = (NBarSeries)m_Chart.Series.Add(SeriesType.Bar);

            series2.MultiBarMode           = MultiBarMode.Clustered;
            series2.FillStyle              = new NColorFillStyle(Color.Gold);
            series2.Name                   = "Product B";
            series2.DataLabelStyle.Visible = false;
            GenerateData(series2.Values, 12);

            // apply style sheet
            NStyleSheet styleSheet = NStyleSheet.CreatePredefinedStyleSheet(PredefinedStyleSheet.Fresh);

            styleSheet.Apply(nChartControl1.Document);

            // init form controls
            YTicksPerLabelUpDown.Value = 1;
            YLabelGenerationModeComboBox.FillFromEnum(typeof(LabelGenerationMode));
            YLabelGenerationModeComboBox.SelectedIndex = (int)LabelGenerationMode.SingleLevel;
            YLabelFitModesList.FillFromEnum(typeof(LabelFitMode));
            YLabelFitModesList.Items[(int)LabelFitMode.AutoScale].Checked = true;

            XTicksPerLabelUpDown.Value = 1;
            XLabelGenerationModeComboBox.FillFromEnum(typeof(LabelGenerationMode));
            XLabelGenerationModeComboBox.SelectedIndex = (int)LabelGenerationMode.SingleLevel;
            XLabelFitModesList.FillFromEnum(typeof(LabelFitMode));
            XLabelFitModesList.Items[(int)LabelFitMode.AutoScale].Checked = true;
        }