Kendo ui 单击图例时剑道图的宽度会发生变化

Kendo ui 单击图例时剑道图的宽度会发生变化,kendo-ui,kendo-chart,Kendo Ui,Kendo Chart,我有以下剑道定义: $("#availabilityChart").kendoChart({ seriesDefaults: { type: "column" }, legend: { position: "bottom", }, seriesColors:

我有以下剑道定义:

$("#availabilityChart").kendoChart({
                seriesDefaults: {
                    type: "column"
                },
                legend: {
                    position: "bottom",
                },
                seriesColors: ["#1C64AF"],
                series: [{
                    name: availabilityDataSelector,
                    data: seriesData,
                    field: "metricValue",
                    categoryField: "month",
                }],
                categoryAxis: [{
                    type: "date",
                    baseUnit: "months",
                    labels: {
                        dateFormats: {
                            days: "MMM"
                        }
                    }
                }],
                valueAxis: [{
                    labels: {
                        format: "{0}%"
                    },
                    line: {
                        visible: false
                    },
                    axisCrossingValue: 0
                }],
                tooltip: {
                    visible: true,
                    format: "{0}%",
                    template: "#= series.name #: #= value #"
                }
            });
首先,图表不是包含div的全部宽度-我希望是这样

其次,当我点击图例中的一个项目(我只有一个)时,图表会调整大小并变成100%的宽度-我怎么能从一开始就做到这一点

最后,我想禁用对图例的单击。我只是想让它显示,但删除的能力,点击项目


谢谢。

要防止图例单击行为,请使用事件:

legendItemClick : function ( e ){
    e.preventDefault();
},
除非有CSS覆盖宽度,否则图表应自动填充容器宽度


谢谢!工作。我也发现了css问题,现在图表是全幅的。