100% Stacked Bar Chart resize when the first element is 80% or higher

0 Answers 80 Views
Charts Styling
Jose
Top achievements
Rank 1
Iron
Iron
Jose asked on 16 Jun 2022, 06:58 AM

Hi there,

I was using this component on my app and I noticed that when the first element of the chart-series is 80% or higher, the background area is resized and the bar gets out of the ploting area. However, I tryed to put 80% in another item and it works fine. Is there any option to deny that resize on the first item?

I modify the https://www.telerik.com/kendo-angular-ui/components/charts/series-types/bar/#toc-100-stacked-bar code to show the problem. Here is the template:

      <kendo-chart>
        <kendo-chart-series>
          <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[16]">
          </kendo-chart-series-item>
          <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[1]">
          </kendo-chart-series-item>
          <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[1]">
          </kendo-chart-series-item>
          <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }"[data]="[1]">
          </kendo-chart-series-item>
          <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[1]">
          </kendo-chart-series-item>
        </kendo-chart-series>
      </kendo-chart>

      <kendo-chart>
      <kendo-chart-series>
        <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[1]">
        </kendo-chart-series-item>
        <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[1]">
        </kendo-chart-series-item>
        <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[16]">
        </kendo-chart-series-item>
        <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }"[data]="[1]">
        </kendo-chart-series-item>
        <kendo-chart-series-item type="bar" [stack]="{ type: '100%' }" [data]="[1]">
        </kendo-chart-series-item>
      </kendo-chart-series>
    </kendo-chart>

Thanks ,

Jose

 

 

Jose
Top achievements
Rank 1
Iron
Iron
commented on 16 Jun 2022, 07:19 AM

For now, I added a new item in every kendo-chart with [data]="[0]" but it is not quite elegant solution.

No answers yet. Maybe you can help?

Tags
Charts Styling
Asked by
Jose
Top achievements
Rank 1
Iron
Iron
Share this question
or