Keep Chart Height Fixed

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    2 posts
    Member since:
    Jul 2020

    Posted 28 Jul Link to this post

    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.

  2. Daniel
    Daniel avatar
    2 posts
    Member since:
    Jul 2020

    Posted 29 Jul Link to this post

    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();

     

     

Back to Top