Kendo UI图表是否无法调整大小? [英] Kendo UI chart not resizing?
问题描述
我有一个Kendo ui图表,该图表显示了来自动态数据源的柱形图.但有时图表会打开可用空间大小的一半.当我单击某些链接或更改日期时,它会自动调整大小.知道为什么会导致它吗?
I have a Kendo ui chart which displays a column chart from a dynamic data source. But occassionally, the chart opens half the size of the available space. When I click on some links or change the date, it resizes itself. Any idea why its causing it?
在数据源更改事件中,当它显示此行为时,它将容器div的宽度显示为0.如果需要,我可以提供更多详细信息
In the datasource change event, its showing the container div's width as 0 when it shows this behaviour. I can give more details if needed
我尝试了答案之一中给出的刷新方法,但没有帮助
I tried the refresh method as given in one of the answers but its not of help
推荐答案
在控制器中获得所有必需的数据后,可以调用Javascript CallBack函数,在其中可以将转换设置为false,然后重绘图表并将过渡设置为true,您还可以默认隐藏图表并在Javascript CallBack函数上使其可见
When you have got all the necessary data in the controller you can call a Javascript CallBack function in which you can set the transition to false and then redraw the chart and set transition to true, also you can hide the chart by default and make it visible on Javascript CallBack function
这篇关于Kendo UI图表是否无法调整大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!