如何使用 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();
});