Skip to content

Commit 7bb0bef

Browse files
authored
Merge pull request #189 from sgratzl/release/v4.2.4
Release v4.2.4
2 parents a6fbc35 + f2edb2d commit 7bb0bef

File tree

9 files changed

+728
-719
lines changed

9 files changed

+728
-719
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "chartjs-chart-geo",
33
"description": "Chart.js module for charting maps",
4-
"version": "4.2.3",
4+
"version": "4.2.4",
55
"author": {
66
"name": "Samuel Gratzl",
77
"email": "sam@sgratzl.com",

src/controllers/BubbleMapController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class BubbleMapController extends GeoController<'bubbleMap', MyPointEleme
107107
static readonly id = 'bubbleMap';
108108

109109
/**
110-
* @internal
110+
* @hidden
111111
*/
112112
static readonly defaults: any = /* #__PURE__ */ merge({}, [
113113
geoDefaults,
@@ -120,7 +120,7 @@ export class BubbleMapController extends GeoController<'bubbleMap', MyPointEleme
120120
]);
121121

122122
/**
123-
* @internal
123+
* @hidden
124124
*/
125125
static readonly overrides: any = /* #__PURE__ */ merge({}, [
126126
geoOverrides,

src/controllers/ChoroplethController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class ChoroplethController extends GeoController<'choropleth', GeoFeature
9494
static readonly id = 'choropleth';
9595

9696
/**
97-
* @internal
97+
* @hidden
9898
*/
9999
static readonly defaults: any = /* #__PURE__ */ merge({}, [
100100
geoDefaults,
@@ -105,7 +105,7 @@ export class ChoroplethController extends GeoController<'choropleth', GeoFeature
105105
]);
106106

107107
/**
108-
* @internal
108+
* @hidden
109109
*/
110110
static readonly overrides: any = /* #__PURE__ */ merge({}, [
111111
geoOverrides,

src/elements/GeoFeature.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export interface IGeoFeatureProps {
6565

6666
export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> implements VisualElement {
6767
/**
68-
* @internal
68+
* @hidden
6969
*/
7070
cache?:
7171
| {
@@ -84,27 +84,27 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
8484
| undefined = undefined;
8585

8686
/**
87-
* @internal
87+
* @hidden
8888
*/
8989
projectionScale!: ProjectionScale;
9090

9191
/**
92-
* @internal
92+
* @hidden
9393
*/
9494
feature!: Feature;
9595

9696
/**
97-
* @internal
97+
* @hidden
9898
*/
9999
center?: { longitude: number; latitude: number };
100100

101101
/**
102-
* @internal
102+
* @hidden
103103
*/
104104
pixelRatio?: number;
105105

106106
/**
107-
* @internal
107+
* @hidden
108108
*/
109109
inRange(mouseX: number, mouseY: number): boolean {
110110
const bb = this.getBounds();
@@ -123,21 +123,21 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
123123
}
124124

125125
/**
126-
* @internal
126+
* @hidden
127127
*/
128128
inXRange(mouseX: number): boolean {
129129
return this.inRange(mouseX, Number.NaN);
130130
}
131131

132132
/**
133-
* @internal
133+
* @hidden
134134
*/
135135
inYRange(mouseY: number): boolean {
136136
return this.inRange(Number.NaN, mouseY);
137137
}
138138

139139
/**
140-
* @internal
140+
* @hidden
141141
*/
142142
getCenterPoint(): { x: number; y: number } {
143143
if (this.cache && this.cache.center) {
@@ -162,7 +162,7 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
162162
}
163163

164164
/**
165-
* @internal
165+
* @hidden
166166
*/
167167
getBounds(): { x: number; y: number; x2: number; y2: number; width: number; height: number } {
168168
if (this.cache && this.cache.bounds) {
@@ -182,7 +182,7 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
182182
}
183183

184184
/**
185-
* @internal
185+
* @hidden
186186
*/
187187
_drawInCache(doc: Document): void {
188188
const bounds = this.getBounds();
@@ -217,15 +217,15 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
217217
}
218218

219219
/**
220-
* @internal
220+
* @hidden
221221
*/
222222
_optionsToKey(): string {
223223
const { options } = this;
224224
return `${options.backgroundColor};${options.borderColor};${options.borderWidth};${this.pixelRatio}`;
225225
}
226226

227227
/**
228-
* @internal
228+
* @hidden
229229
*/
230230
_drawImpl(ctx: CanvasRenderingContext2D): void {
231231
const { feature } = this;
@@ -244,7 +244,7 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
244244
}
245245

246246
/**
247-
* @internal
247+
* @hidden
248248
*/
249249
draw(ctx: CanvasRenderingContext2D): void {
250250
const { feature } = this;
@@ -275,7 +275,7 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
275275
static id = 'geoFeature';
276276

277277
/**
278-
* @internal
278+
* @hidden
279279
*/
280280
static defaults = /* #__PURE__ */ {
281281
...BarElement.defaults,
@@ -287,7 +287,7 @@ export class GeoFeature extends Element<IGeoFeatureProps, IGeoFeatureOptions> im
287287
};
288288

289289
/**
290-
* @internal
290+
* @hidden
291291
*/
292292
static defaultRoutes = /* #__PURE__ */ {
293293
outlineBorderColor: 'borderColor',

src/scales/ColorScale.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const colorScaleDefaults = {
179179

180180
export class ColorScale extends LegendScale<IColorScaleOptions & LinearScaleOptions> {
181181
/**
182-
* @internal
182+
* @hidden
183183
*/
184184
get interpolate(): (v: number) => string {
185185
const o = this.options as IColorScaleOptions & LinearScaleOptions;
@@ -193,7 +193,7 @@ export class ColorScale extends LegendScale<IColorScaleOptions & LinearScaleOpti
193193
}
194194

195195
/**
196-
* @internal
196+
* @hidden
197197
*/
198198
getColorForValue(value: number): string {
199199
const v = this._getNormalizedValue(value);
@@ -204,7 +204,7 @@ export class ColorScale extends LegendScale<IColorScaleOptions & LinearScaleOpti
204204
}
205205

206206
/**
207-
* @internal
207+
* @hidden
208208
*/
209209
getColor(normalized: number): string {
210210
let v = normalized;
@@ -215,7 +215,7 @@ export class ColorScale extends LegendScale<IColorScaleOptions & LinearScaleOpti
215215
}
216216

217217
/**
218-
* @internal
218+
* @hidden
219219
*/
220220
_drawIndicator(): void {
221221
const { indicatorWidth: indicatorSize } = this.options.legend;
@@ -261,12 +261,12 @@ export class ColorScale extends LegendScale<IColorScaleOptions & LinearScaleOpti
261261
static readonly id = 'color';
262262

263263
/**
264-
* @internal
264+
* @hidden
265265
*/
266266
static readonly defaults: any = /* #__PURE__ */ merge({}, [LinearScale.defaults, baseDefaults, colorScaleDefaults]);
267267

268268
/**
269-
* @internal
269+
* @hidden
270270
*/
271271
static readonly descriptors = /* #__PURE__ */ {
272272
_scriptable: (name: string): boolean => name !== 'interpolate',
@@ -278,7 +278,7 @@ export class ColorLogarithmicScale extends LogarithmicLegendScale<IColorScaleOpt
278278
private interpolate = (v: number) => `rgb(${v},${v},${v})`;
279279

280280
/**
281-
* @internal
281+
* @hidden
282282
*/
283283
init(options: IColorScaleOptions & LinearScaleOptions): void {
284284
super.init(options);
@@ -290,14 +290,14 @@ export class ColorLogarithmicScale extends LogarithmicLegendScale<IColorScaleOpt
290290
}
291291

292292
/**
293-
* @internal
293+
* @hidden
294294
*/
295295
getColorForValue(value: number): string {
296296
return ColorScale.prototype.getColorForValue.call(this, value);
297297
}
298298

299299
/**
300-
* @internal
300+
* @hidden
301301
*/
302302
getColor(normalized: number): string {
303303
let v = normalized;
@@ -314,7 +314,7 @@ export class ColorLogarithmicScale extends LogarithmicLegendScale<IColorScaleOpt
314314
static readonly id = 'colorLogarithmic';
315315

316316
/**
317-
* @internal
317+
* @hidden
318318
*/
319319
static readonly defaults: any = /* #__PURE__ */ merge({}, [
320320
LogarithmicScale.defaults,
@@ -323,7 +323,7 @@ export class ColorLogarithmicScale extends LogarithmicLegendScale<IColorScaleOpt
323323
]);
324324

325325
/**
326-
* @internal
326+
* @hidden
327327
*/
328328
static readonly descriptors = /* #__PURE__ */ {
329329
_scriptable: (name: string): boolean => name !== 'interpolate',

src/scales/LegendScale.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ function computeLegendPosition(
147147

148148
export class LegendScale<O extends ILegendScaleOptions & LinearScaleOptions> extends LinearScale<O> {
149149
/**
150-
* @internal
150+
* @hidden
151151
*/
152152
legendSize: { w: number; h: number } = { w: 0, h: 0 };
153153

154154
/**
155-
* @internal
155+
* @hidden
156156
*/
157157
init(options: O): void {
158158
// eslint-disable-next-line no-param-reassign
@@ -162,7 +162,7 @@ export class LegendScale<O extends ILegendScaleOptions & LinearScaleOptions> ext
162162
}
163163

164164
/**
165-
* @internal
165+
* @hidden
166166
*/
167167
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
168168
parse(raw: any, index: number): number {
@@ -173,7 +173,7 @@ export class LegendScale<O extends ILegendScaleOptions & LinearScaleOptions> ext
173173
}
174174

175175
/**
176-
* @internal
176+
* @hidden
177177
*/
178178
isHorizontal(): boolean {
179179
return this.options.legend.align === 'top' || this.options.legend.align === 'bottom';
@@ -187,7 +187,7 @@ export class LegendScale<O extends ILegendScaleOptions & LinearScaleOptions> ext
187187
}
188188

189189
/**
190-
* @internal
190+
* @hidden
191191
*/
192192
update(maxWidth: number, maxHeight: number, margins: ChartArea): void {
193193
const ch = Math.min(maxHeight, this.bottom == null ? Number.POSITIVE_INFINITY : this.bottom);
@@ -214,15 +214,15 @@ export class LegendScale<O extends ILegendScaleOptions & LinearScaleOptions> ext
214214
}
215215

216216
/**
217-
* @internal
217+
* @hidden
218218
*/
219219
// eslint-disable-next-line class-methods-use-this
220220
_computeLabelArea(): void {
221221
return undefined;
222222
}
223223

224224
/**
225-
* @internal
225+
* @hidden
226226
*/
227227
draw(chartArea: ChartArea): void {
228228
if (!(this as any)._isVisible()) {
@@ -258,7 +258,7 @@ export class LegendScale<O extends ILegendScaleOptions & LinearScaleOptions> ext
258258
}
259259

260260
/**
261-
* @internal
261+
* @hidden
262262
*/
263263
// eslint-disable-next-line class-methods-use-this
264264
protected _drawIndicator(): void {
@@ -270,27 +270,27 @@ export class LogarithmicLegendScale<
270270
O extends ILegendScaleOptions & LogarithmicScaleOptions
271271
> extends LogarithmicScale<O> {
272272
/**
273-
* @internal
273+
* @hidden
274274
*/
275275
legendSize: { w: number; h: number } = { w: 0, h: 0 };
276276

277277
/**
278-
* @internal
278+
* @hidden
279279
*/
280280
init(options: O): void {
281281
LegendScale.prototype.init.call(this, options);
282282
}
283283

284284
/**
285-
* @internal
285+
* @hidden
286286
*/
287287
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
288288
parse(raw: any, index: number): number {
289289
return LegendScale.prototype.parse.call(this, raw, index);
290290
}
291291

292292
/**
293-
* @internal
293+
* @hidden
294294
*/
295295
isHorizontal(): boolean {
296296
return this.options.legend.align === 'top' || this.options.legend.align === 'bottom';
@@ -304,22 +304,22 @@ export class LogarithmicLegendScale<
304304
}
305305

306306
/**
307-
* @internal
307+
* @hidden
308308
*/
309309
update(maxWidth: number, maxHeight: number, margins: ChartArea): void {
310310
return LegendScale.prototype.update.call(this, maxWidth, maxHeight, margins);
311311
}
312312

313313
/**
314-
* @internal
314+
* @hidden
315315
*/
316316
// eslint-disable-next-line class-methods-use-this
317317
_computeLabelArea(): void {
318318
return undefined;
319319
}
320320

321321
/**
322-
* @internal
322+
* @hidden
323323
*/
324324
draw(chartArea: ChartArea): void {
325325
return LegendScale.prototype.draw.call(this, chartArea);

0 commit comments

Comments
 (0)