1. Home
  2. Docs
  3. Bar Chart
  4. Setting the scope of the view

Setting the scope of the view

The bar chart has a view scope that can be set manually or automatically. Let’s have a look :

  • Min Bar Value controls the minimum values showed on the bar axis. Any bar that is out of this bound will simply not be show. If set to Auto graph and chart will automatically fit the bars into the view.
  • Max Bar Value controls the maximum values showed on the bar axis. Any bar that is out of bound will be trimmed into this value. If set to Auto graph and chart will automatically fit the bars into the view.

Setting the view scope from code

The view scope can be set from code as well. It can be done in the following way:

            barChart.DataSource.AutomaticMaxValue = true / false;
            barChart.DataSource.AutomaticMInValue = true / false;
            public double min,max;
            barChart.DataSource.MinValue = min;
            barChart.DataSource.MaxValue = max;