mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Adhere to pointDot option in config
- Added `display` property on Point classes, to determine whether the draw sequence should run or not.
This commit is contained in:
parent
28dd492460
commit
38d1b87e1c
23
Chart.js
vendored
23
Chart.js
vendored
@ -1047,20 +1047,21 @@
|
||||
return ((Math.pow(chartX-this.x, 2)+Math.pow(chartY-this.y, 2)) < Math.pow(hitDetectionRange,2));
|
||||
},
|
||||
draw : function(){
|
||||
var ctx = this.ctx;
|
||||
ctx.beginPath();
|
||||
if (this.display){
|
||||
var ctx = this.ctx;
|
||||
ctx.beginPath();
|
||||
|
||||
ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
|
||||
ctx.closePath();
|
||||
ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
|
||||
ctx.closePath();
|
||||
|
||||
ctx.strokeStyle = this.strokeColor;
|
||||
ctx.lineWidth = this.strokeWidth;
|
||||
ctx.strokeStyle = this.strokeColor;
|
||||
ctx.lineWidth = this.strokeWidth;
|
||||
|
||||
ctx.fillStyle = this.fillColor;
|
||||
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
ctx.fillStyle = this.fillColor;
|
||||
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
|
||||
//Quick debug for bezier curve splining
|
||||
@ -2419,6 +2420,7 @@
|
||||
this.PointClass = Chart.Point.extend({
|
||||
strokeWidth : this.options.pointDotStrokeWidth,
|
||||
radius : this.options.pointDotRadius,
|
||||
display: this.options.pointDot,
|
||||
hitDetectionRadius : this.options.pointHitDetectionRadius,
|
||||
ctx : this.chart.ctx,
|
||||
inRange : function(mouseX){
|
||||
@ -3023,6 +3025,7 @@
|
||||
this.PointClass = Chart.Point.extend({
|
||||
strokeWidth : this.options.pointDotStrokeWidth,
|
||||
radius : this.options.pointDotRadius,
|
||||
display: this.options.pointDot,
|
||||
hitDetectionRadius : this.options.pointHitDetectionRadius,
|
||||
ctx : this.chart.ctx
|
||||
});
|
||||
|
||||
4
Chart.min.js
vendored
4
Chart.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1047,20 +1047,21 @@
|
||||
return ((Math.pow(chartX-this.x, 2)+Math.pow(chartY-this.y, 2)) < Math.pow(hitDetectionRange,2));
|
||||
},
|
||||
draw : function(){
|
||||
var ctx = this.ctx;
|
||||
ctx.beginPath();
|
||||
if (this.display){
|
||||
var ctx = this.ctx;
|
||||
ctx.beginPath();
|
||||
|
||||
ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
|
||||
ctx.closePath();
|
||||
ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
|
||||
ctx.closePath();
|
||||
|
||||
ctx.strokeStyle = this.strokeColor;
|
||||
ctx.lineWidth = this.strokeWidth;
|
||||
ctx.strokeStyle = this.strokeColor;
|
||||
ctx.lineWidth = this.strokeWidth;
|
||||
|
||||
ctx.fillStyle = this.fillColor;
|
||||
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
ctx.fillStyle = this.fillColor;
|
||||
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
|
||||
//Quick debug for bezier curve splining
|
||||
|
||||
@ -57,6 +57,7 @@
|
||||
this.PointClass = Chart.Point.extend({
|
||||
strokeWidth : this.options.pointDotStrokeWidth,
|
||||
radius : this.options.pointDotRadius,
|
||||
display: this.options.pointDot,
|
||||
hitDetectionRadius : this.options.pointHitDetectionRadius,
|
||||
ctx : this.chart.ctx,
|
||||
inRange : function(mouseX){
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
this.PointClass = Chart.Point.extend({
|
||||
strokeWidth : this.options.pointDotStrokeWidth,
|
||||
radius : this.options.pointDotRadius,
|
||||
display: this.options.pointDot,
|
||||
hitDetectionRadius : this.options.pointHitDetectionRadius,
|
||||
ctx : this.chart.ctx
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user