我正在使用主题,但我想将图表周围的背景颜色设置为白色或透明或其他东西.
我正在尝试这段代码:
var myTheme = dojox.charting.themes.PlotKit.orange;
myTheme.fill= "white";
chart10.setTheme(myTheme);
chart10.addPlot("default", {
type: "Pie",
labelOffset: -30,
radius: 150,
startAngle: 45,
font: "normal normal 10pt Tahoma",
fontColor: "black",
labelWiring: "grey",
labelStyle: "columns",
htmlLabels: true,
plotarea: { fill: "#000" }
});
但是这段代码没有用,没有任何改动可见.
我该如何设置颜色背景?
解决方法:
我相信你必须同时设置chart.fill和plotarea.fill属性.
myTheme.chart.fill= "white";
myTheme.plotarea.fill = "white";
如果你执行console.debug(myTheme),你可以检查主题对象的所有属性.在找到合适的产品之前,我通常需要进行一些实验.
原文地址:https://codeday.me/bug/20190613/1234502.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。