From b2d5a5fa97bc56fe00565f357c482514cda64ce0 Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Fri, 18 Dec 2020 19:36:18 +0200 Subject: [PATCH] Update defaults and types for tick stroke (#8195) --- src/core/core.scale.js | 4 ++-- types/scales/index.d.ts | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 2b4e4f235..f207ef541 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -59,8 +59,8 @@ defaults.set('scale', { minRotation: 0, maxRotation: 50, mirror: false, - lineWidth: 0, - strokeStyle: '', + textStrokeWidth: 0, + textStrokeColor: '', padding: 0, display: true, autoSkip: true, diff --git a/types/scales/index.d.ts b/types/scales/index.d.ts index 275c31b44..e22047044 100644 --- a/types/scales/index.d.ts +++ b/types/scales/index.d.ts @@ -69,6 +69,16 @@ export interface TickOptions { * Sets the offset of the tick labels from the axis */ padding: number; + /** + * The color of the stroke around the text. + * @default undefined + */ + textStrokeColor: Color; + /** + * Stroke width around the text. + * @default 0 + */ + textStrokeWidth: number; /** * z-index of tick layer. Useful when ticks are drawn on chart area. Values <= 0 are drawn under datasets, > 0 on top. * @default 0 -- 2.47.3