jQWidgets Forums

jQuery UI Widgets Forums Chart axis labels cutt off

This topic contains 1 reply, has 1 voice, and was last updated by  aykutucar 6 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • axis labels cutt off #101612

    aykutucar
    Participant

    Hi,
    I created a bar char but my labels cut off for some reason.
    It has nothing to do with outer div’s scrollbar.
    I increased the height to 1200px nothing changes, only the bars get longer and labels are still cutoff.
    Any ideas?
    Thanks for your help.

    screenshot
    https://1drv.ms/u/s!As2d1QAba5s6gYAaCPiS8paApvf9Ug

    var dataJson = JSON.parse(data);
    $(“#chartStatus”).css(“height”,(dataJson.length * 35) +”px”);
    var settings = {
    title: “”,
    description: “”,
    enableAnimations: true,
    showLegend: false,
    showToolTips: true,
    showBorderLine: true,
    padding: { left: 10, top: 5, right: 20, bottom: 5 },
    colorScheme: “scheme02″,
    source: dataJson,
    categoryAxis:
    {
    textRotationAngle: 90,
    labels: { horizontalAlignment: ‘right’, class:”lblStatusChart” },
    dataField: “Status”,
    showGridLines: true,
    },

    valueAxis:{
    flip: true,
    },
    seriesGroups:
    [
    {
    type: ‘column’,
    orientation: ‘horizontal’,
    columnsGapPercent: 100,
    showLabels: true,
    series:
    [
    {
    dataField: “Count”,
    displayText: “Status”,
    labels: {
    visible: true,
    horizontalAlignment: ‘right’,
    offset: { x: 20, y: 0 }
    },
    formatFunction: function (value) {
    if (isNaN(value))
    return value;
    return parseFloat(value);
    },
    legendFormatFunction: function (value, index) {
    return value + ‘ (‘ + dataJson[index].Count + ‘)’;
    }
    }
    ]
    }
    ]
    };

    axis labels cutt off #101614

    aykutucar
    Participant

    Never mind, this fixed it:
    padding: { left: 30, top: 5, right: 20, bottom: 5 },
    that 30 is probably the scrollbar’s width.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.