0
我正在使用此示例创建标尺,但我必须更改指针样式。 是否可以像这样改变指针风格?更改指针线条样式
Chart.Type.extend({
//Passing in a name registers this chart in the Chart namespace
name: "Gauge",
//Providing a defaults will also register the deafults in the chart namespace
defaults : defaultConfig,
initialize: function(data){
//Declare segments as a static property to prevent inheriting across the Chart type prototype
this.segments = [];
var pointerDotRadius = helpers.min([this.chart.width,this.chart.height])/50;
this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) - this.options.segmentStrokeWidth/2)/2;
this.SegmentArc = Chart.Arc.extend({
ctx : this.chart.ctx,
x : this.chart.width/2,
y : this.chart.height - pointerDotRadius
});
所有代码: jsbin.com
FWIW当我释放新版本时,示例中的指针将更改为更接近图片的指针。 – Richard