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

Keep Chart Height Fixed

1 Answer 147 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 28 Jul 2020, 11:00 PM

The chart's behavior is supposed to be as follows: 

-The x-axis is a range of dates the user can select from externally

-The y-axis always stays percentages 0-100

 

The issue I'm having is when I select too many dates, the chart's height automatically increases above the specified height parameter. Using maxHeight and height have not helped this issue.

1 Answer, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 29 Jul 2020, 01:46 PM

Never mind, found the fix. If anyone else is having this issue I used this fix at the bottom of the chart:

 

_speedPercentChart = $("#speedingScorecardChart").data("kendoChart");
        if (_speedPercentChart.options.chartArea.height > 250) {
            _speedPercentChart.options.chartArea.height = 250;
            _speedPercentChart.redraw();

 

 

Tags
Charts
Asked by
Daniel
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Share this question
or