]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Tooltip Model documentation sounds not correct (#7592)
authorstockiNail <stocki.nail@gmail.com>
Wed, 8 Jul 2020 21:17:53 +0000 (23:17 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2020 21:17:53 +0000 (17:17 -0400)
Tooltip Model documentation sounds not correct
Fixed #7591

docs/docs/configuration/tooltip.md
docs/docs/getting-started/v3-migration.md

index 3fb37fc6c8466718e2183e651336c3cd0d2ce4c4..85dc19a8add5de041b8a6e54089b0ddd309851c8 100644 (file)
@@ -291,8 +291,6 @@ The tooltip model contains parameters that can be used to render the tooltip.
     dataPoints: TooltipItem[],
 
     // Positioning
-    xPadding: number,
-    yPadding: number,
     xAlign: string,
     yAlign: string,
 
@@ -316,31 +314,14 @@ The tooltip model contains parameters that can be used to render the tooltip.
     beforeBody: string[],
     // line of text that appear after the body and before the footer
     afterBody: string[],
-    bodyFont: Font,
-    _bodyAlign: string,
-    bodySpacing: number,
 
     // Title
     // lines of text that form the title
     title: string[],
-    titleFont: Font,
-    _titleAlign: string,
-    titleSpacing: number,
-    titleMarginBottom: number,
 
     // Footer
     // lines of text that form the footer
     footer: string[],
-    footerFont: Font,
-    _footerAlign: string,
-    footerSpacing: number,
-    footerMarginTop: number,
-
-    // Appearance
-    caretSize: number,
-    caretPadding: number,
-    cornerRadius: number,
-    backgroundColor: Color,
 
     // colors to render for each item in body[]. This is the color of the squares in the tooltip
     labelColors: Color[],
@@ -348,9 +329,8 @@ The tooltip model contains parameters that can be used to render the tooltip.
 
     // 0 opacity is a hidden tooltip
     opacity: number,
-    multiKeyBackground: Color,
-    displayColors: boolean,
-    borderColor: Color,
-    borderWidth: number
+
+    // tooltip options
+    options : Object
 }
 ```
index c3f3a929bdcb67d1d9fcc2a8a8e422e1de41a894..c264a1d625f9c657c6cb49d0d52d9a33801c828b 100644 (file)
@@ -188,6 +188,7 @@ Animation system was completely rewritten in Chart.js v3. Each property can now
 * `xLabel` and `yLabel` were removed. Please use `index` and `value`
 * The `filter` option will now be passed additional parameters when called and should have the method signature `function(tooltipItem, index, tooltipItems, data)`
 * The `custom` callback now takes a context object that has `tooltip` and `chart` properties
+* All properties of tooltip model related to the tooltip options have been moved to reside within the `options` property.
 
 ## Developer migration