0
如何使用AnyChart生成自定義顏色?如何使用AnyChart生成自定義顏色?
這是我到目前爲止。我已經評論了這一行,它是指調色板 - 「嘗試影響調色板」。
anychart.onDocumentReady(function() {
//Trying to affect palette here
//led.palette = anychart.palettes.earth;
// create a stage
stage = anychart.graphics.create("diagramContainer");
// create data
var data = [170, 210, 130, 310];
// set the gauge type
led = anychart.gauges.led();
// set data for the gauge
led.data(data);
// add the default pointer
led.addPointer(2);
// set the size and position
led.bounds("50%", 0, "25%", "100%");
// sets background settings.
led.background({fill: "#FFFFFF 0.0"});
// sets left bound.
led.left("28%");
// sets height.
led.height("35%");
// set the container id
led.container(stage);
// initiate the gauge drawing
led.draw();
});