This is a migrated thread and some comments may be shown as answers.

Remove White Space / Move Category Axis To Left/Right

1 Answer 282 Views
Charts
This is a migrated thread and some comments may be shown as answers.
DerekAlfonso
Top achievements
Rank 1
DerekAlfonso asked on 29 May 2020, 07:31 PM
As you can see in this Dojo example, I have a stacked bar chart with a line on the top in another series.  If I remove the line, the chart does not have the unwanted white space.  How do I keep the line, but have the chart formatted like this.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 02 Jun 2020, 03:05 PM

Hello Derek,

This behavior is by design. The Line chart always renders from the middle of the categoryAxis space. if you examien the online demos you will see this pplies in each Line chart.

What I can sugegst here is to add more categoryAxis.categories data and set categoryAxis.min and categoryAxis.max. Please see this appied i nthe Dojo below:

categoryAxis: {
                  categories: [
                    new Date("2019/12/01"),
                    new Date("2020/01/01"),
                    new Date("2020/02/01"),
                    new Date("2020/03/01"),
                    new Date("2020/04/01"),
                    new Date("2020/05/01"),
                    new Date("2020/06/01"),
                    new Date("2020/07/01"),
                    new Date("2020/08/01"),
                    new Date("2020/09/01"),
                    new Date("2020/10/01")
                  ],
                  min: new Date("2020/01/01"),
      	          max: new Date("2020/09/01"),

Let me knwo if you have any questions.

Regards,
Nikolay
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Charts
Asked by
DerekAlfonso
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or