【问题标题】:Kendo UI, how do you remove space before and after a bar chart?Kendo UI,如何去除条形图前后的空格?
【发布时间】:2014-07-31 22:39:37
【问题描述】:

我正在尝试删除下面的 Kendo UI 图表前后的空格,但没有成功。这是间隙和间距问题吗?我的目标是制作一个仅在右侧显示灰色的单线条形图。

JSFiddle Codes Here

$(document).ready(allFamilyTicketsBarChartThisYear);

function allFamilyTicketsBarChartThisYear() {
    $("#chart-7").kendoChart({
        title: {
            visible: false,
        },
        legend: {
            visible: false,
        },
        chartArea: {
            height: 90,
            padding: 0,
            margin: 0,
            background: "transparent"
        },
        seriesDefaults: {
            type: "bar",
        },
        series: [
            {
                //gap: 0,
                //spacing: 0,
                //border: {
                //    width: 0
                //},
                // the above removes the height of the bar
                name: "monthThisYear",
                data: [506785]
            }
        ],
        valueAxis: {
            max: 1000000,
            labels: {
                visible: false
            },
            line: {
                visible: false
            },
            minorGridLines: {
                visible: false
            },
            majorGridLines: {
                visible: false
            }
        },
        categoryAxis: {
            line: {
                visible: false
            },
            minorGridLines: {
                visible: false
            },
            majorGridLines: {
                visible: false
            }
        },
        tooltip: {
            visible: false,
        }
    });
}

【问题讨论】:

    标签: javascript jquery css kendo-ui kendo-dataviz


    【解决方案1】:

    如果您隐藏类别轴而不是网格线,它看起来就像我认为您所描述的那样 (http://jsfiddle.net/3VXqA/2/)

     categoryAxis: {
             visible: false
     },
    

    【讨论】:

      猜你喜欢
      • 2012-04-26
      • 1970-01-01
      • 2022-01-17
      • 1970-01-01
      • 1970-01-01
      • 2014-09-05
      • 2023-03-20
      • 1970-01-01
      • 2019-01-07
      相关资源
      最近更新 更多