@@ -79,6 +79,14 @@ module.exports = function(Chart) {
79
79
var pointElementOptions = me . chart . options . elements . point ;
80
80
var pointPosition = scale . getPointPositionForValue ( index , dataset . data [ index ] ) ;
81
81
82
+ // Compatibility: If the properties are defined with only the old name, use those values
83
+ if ( ( dataset . radius !== undefined ) && ( dataset . pointRadius === undefined ) ) {
84
+ dataset . pointRadius = dataset . radius ;
85
+ }
86
+ if ( ( dataset . hitRadius !== undefined ) && ( dataset . pointHitRadius === undefined ) ) {
87
+ dataset . pointHitRadius = dataset . hitRadius ;
88
+ }
89
+
82
90
helpers . extend ( point , {
83
91
// Utility
84
92
_datasetIndex : me . index ,
@@ -99,7 +107,7 @@ module.exports = function(Chart) {
99
107
pointStyle : custom . pointStyle ? custom . pointStyle : helpers . getValueAtIndexOrDefault ( dataset . pointStyle , index , pointElementOptions . pointStyle ) ,
100
108
101
109
// Tooltip
102
- hitRadius : custom . hitRadius ? custom . hitRadius : helpers . getValueAtIndexOrDefault ( dataset . hitRadius , index , pointElementOptions . hitRadius )
110
+ hitRadius : custom . hitRadius ? custom . hitRadius : helpers . getValueAtIndexOrDefault ( dataset . pointHitRadius , index , pointElementOptions . hitRadius )
103
111
}
104
112
} ) ;
105
113
@@ -150,7 +158,7 @@ module.exports = function(Chart) {
150
158
var model = point . _model ;
151
159
var pointElementOptions = this . chart . options . elements . point ;
152
160
153
- model . radius = custom . radius ? custom . radius : helpers . getValueAtIndexOrDefault ( dataset . radius , index , pointElementOptions . radius ) ;
161
+ model . radius = custom . radius ? custom . radius : helpers . getValueAtIndexOrDefault ( dataset . pointRadius , index , pointElementOptions . radius ) ;
154
162
model . backgroundColor = custom . backgroundColor ? custom . backgroundColor : helpers . getValueAtIndexOrDefault ( dataset . pointBackgroundColor , index , pointElementOptions . backgroundColor ) ;
155
163
model . borderColor = custom . borderColor ? custom . borderColor : helpers . getValueAtIndexOrDefault ( dataset . pointBorderColor , index , pointElementOptions . borderColor ) ;
156
164
model . borderWidth = custom . borderWidth ? custom . borderWidth : helpers . getValueAtIndexOrDefault ( dataset . pointBorderWidth , index , pointElementOptions . borderWidth ) ;
0 commit comments