]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update defaults and types for tick stroke (#8195)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Fri, 18 Dec 2020 17:36:18 +0000 (19:36 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 17:36:18 +0000 (12:36 -0500)
src/core/core.scale.js
types/scales/index.d.ts

index 2b4e4f2351bb0f853437c8710a9ace453a017976..f207ef5417445781a5461a66278bffa8539ab7ea 100644 (file)
@@ -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,
index 275c31b442cb6b3a86d78f8e5ec10ce2348c6090..e22047044e724289d2ac277c34752683d264abd5 100644 (file)
@@ -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