Beispiel #1
0
 public static GdiGrid ToGdiGrid(ChartGridModel chartGrid)
 {
     return(new GdiGrid
     {
         LineColor = chartGrid.LineColor,
         LineWidth = chartGrid.LineWidth,
         ColumnLinesVisible = chartGrid.ColumnLinesVisible,
         RowLinesVisible = chartGrid.RowLinesVisible
     });
 }
        private void AddChartArea(GdiRectangle chartArea)
        {
            if (ChartGridModel == null)
            {
                ChartGridModel = new ChartGridModel
                {
                    LineColor = Color.LightGray
                };
            }

            _barChartArea = new GdiStackedColumn100ChartArea
            {
                Size            = chartArea.Size,
                CellSize        = new SizeF(_categoryWidth, _heightUnit * StepSize),
                ChartGridModel  = ChartGridModel,
                BarSettingModel = BarSetting,
                DataSet         = DataSet
            };
            chartArea.AddChild(_barChartArea);
        }
        internal void SetGrid(ChartGridModel gridModel)
        {
            if (this.grid == gridModel)
            {
                return;
            }

            if (this.grid != null)
            {
                this.children.Remove(this.grid);
            }

            this.grid = gridModel;

            if (this.grid != null)
            {
                this.children.Add(this.grid);
            }

            this.Invalidate(ChartAreaInvalidateFlags.All);
        }
Beispiel #4
0
        private void AddChartArea(GdiRectangle chartArea)
        {
            if (ChartGridModel == null)
            {
                ChartGridModel = new ChartGridModel
                {
                    LineColor = Color.LightGray
                };
            }

            _barChartArea = new GdiBarChartArea
            {
                // base
                LeftPanelWidth = _rootX - Padding.Left,
                Size           = chartArea.Size,
                CellSize       = new SizeF(_widthUnit * StepSize, _categoryHeight),
                ChartGridModel = ChartGridModel,
                // GdiBarChartDataArea
                BarSettingModel = BarSetting,
                DataSet         = DataSet,
                WidthUnit       = _widthUnit
            };
            chartArea.AddChild(_barChartArea);
        }