javascript – 使用KendoUI饼图,如何删除空格?
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了javascript – 使用KendoUI饼图,如何删除空格?,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1717字,纯文字阅读大概需要3分钟。
内容图文
我正在使用KendoUI饼图,我有很多白色空间.删除它的最佳方法是什么.见下图:
我的java脚本如下所示:
<div id="divGraph1" style="width:250px; height:250px;"/>
jQuery("#divGraph1").kendoChart({
legend:{
position: "bottom",
padding: 1,
margin: 1
},
seriesDefaults:{
labels:{
visible: true,
template: "#= kendo.format('{0:P}', percentage)#"
},
visible: true
},
tooltip:{
visible: true,
template: "#= category # - #= kendo.format('{0:P}', percentage)#"
},
seriesColors: [
"#004990", "#da7633", "#8a7967", "#8b0f04", "#ead766", "#676200", "78496a"
],
title: {
padding: 1,
margin: 1
},
chartArea: { margin: 1 },
plotArea: { margin: 1 },
series:[{
type: "pie",
data: [
{ category: "Facilities in IDN", value: 3 },
{ category: "Standalone Facilities", value: 4 }
]
}]
});
任何建议将不胜感激.
解决方法:
你能提供容器元素的宽度吗?我可以提供更准确的答案.
从你的图像,我显示它大约475px宽.有一个高度配置选项可用于缩小尺寸.它需要一个整数(以像素为单位).
jQuery("#divGraph1").kendoChart({
legend:{
position: "bottom",
padding: 1,
margin: 1
},
seriesDefaults:{
labels:{
visible: true,
template: "#= kendo.format('{0:P}', percentage)#"
},
visible: true
},
tooltip:{
visible: true,
template: "#= category # - #= kendo.format('{0:P}', percentage)#"
},
seriesColors: [
"#004990", "#da7633", "#8a7967", "#8b0f04", "#ead766", "#676200", "78496a"
],
title: {
padding: 1,
margin: 1
},
chartArea: {
margin: 1,
height:300 /* add this option */
},
plotArea: { margin: 1 },
series:[{
type: "pie",
data: [
{ category: "Facilities in IDN", value: 3 },
{ category: "Standalone Facilities", value: 4 }
]
}]
});
如果您不喜欢在选项中传递布局信息(我不喜欢!),Kendo将从您用于保存图表的div继承CSS.以下HTML将图表限制为475×300.
<div id='divGraph1' style='width:475px;height300px'></div>
内容总结
以上是互联网集市为您收集整理的javascript – 使用KendoUI饼图,如何删除空格?全部内容,希望文章能够帮你解决javascript – 使用KendoUI饼图,如何删除空格?所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。