我有一個混合圖表與價值框與頂級的位置。在除第一個值之外的所有內容中,背景顏色已從值框中消失。之前的工作正常,白色背景顯示在所有值框後面,並且代碼沒有變化,所以我不知道爲什麼背景顏色突然消失。以下是我的代碼顯示的問題。任何幫助或指導如何解決這個問題將不勝感激。價值框背景消失
var maxYValue = 60;
var value1 = 40;
var value2 = 15;
var value3 = 34;
var value4 = 14;
var value5 = 20;
var zones = {
"type": "mixed",
"font-family": "proxima_nova_rgregular",
"title": {
"text": "MINUTES IN ZONES",
"font-family": "proxima_nova_rgregular",
"background-color": "none",
"font-color": "#39393d",
"font-size": "22px",
"adjustLayout": true
},
"plot": {
"borderRadius": "5px 5px 0 0",
"bar-width": '50%',
"animation": {
"delay": 300,
"effect": 11,
"speed": "500",
"method": "0",
"sequence": "3",
"z-index": 2
},
"value-box": {
"placement": "top-out",
"text": "%v",
"decimals": 0,
"font-color": "#35353b",
"font-size": "14px",
"alpha": 1,
"background-color": "#ffffff",
"padding": "5px 5px 0px 5px",
"shadow": false,
"z-index": 4
}
},
"plotarea": {
"border-left": "3px solid #39393d",
"border-bottom": "3px solid #39393d",
"padding-left": "3px",
"margin": "dynamic",
"background-color": "none"
},
"tooltip": {
"visible": false
},
"scale-x": {
"placement": "opposite",
"labels":["Zone 1","Zone 2","Zone 3","Zone 4","Zone 5"],
"line-width": 0,
"tick": {
"visible": false
},
"guide": {
"visible": false
},
"item": {
"offsetY": 25,
"font-size": 12,
"fontColor": 'black',
"bold": true
},
},
"scale-y": {
"offsetEnd": 45,
"max-value": maxYValue,
"visible": false,
"line-width": 0,
"guide": {
"visible": false
}
},
"series": [
{
"type": "bar",
"values": [
value1, value2, value3, value4, value5
],
"background-color": "#cdcccc",
"z-index": 2,
"styles": ['#cdcccc', '#71cbdc', '#8cc541', '#d96c27', '#ea2629']
},
{
"type": "line",
"line-color": "gray",
"marker": {
"backgroundColor":"white",
"borderWidth": 2,
"border-color": "#35353b",
"visible": false,
"rules":[
{
"rule":" %node-index%3 == 1 ",
"visible": true,
"size": 7,
"offset-y": -15
}
]
},
"value-box": {
"visible": 0
},
"values": [
[0, value1 + 2],
[0, maxYValue],
[0, null],
[1, value2 + 2],
[1, maxYValue],
[1, null],
[2, value3 + 2],
[2, maxYValue],
[2, null],
[3, value4 + 2],
[3, maxYValue],
[3, null],
[4, value5 + 2],
[4, maxYValue],
[4, null],
]
}
]
}
zingchart.render({
id : 'zones',
data : zones,
height: "320",
width: "100%",
output : 'canvas'
});
<script src="https://cdn.zingchart.com/2.5.2/zingchart.min.js"></script>
<div class="ctabprcci-chart zone-chart" id="zones"></div>
啊,另一個開發者*輸出沒有改變*從SVG最近到畫布上。不幸的是,我們需要將它保留爲畫布,因爲我們已經編寫了自定義功能來在社交媒體上共享導出的圖形圖像。我們正在使用var imgData = zingchart.exec('zones','getimagedata',{ format:'png' }); 以及zingchart.AJAXEXPORT = true;和zingchart.EXPORTURL ='http://export.zingchart.com/';它只適用於畫布輸出。我非常感謝你加入這張票! –
有沒有另外一種方法可以在我可以同時使用的價值框值後面獲得白色背景?我們正在嘗試在下週推出此特定圖表的項目。 –
在即將發佈的新版本中,我們允許svg和此導出功能。不只是在畫布上。這將在未來一週左右。 – nardecky