File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
sandboxes/custom/src/components Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,16 @@ import { createTypedChart } from 'vue-chartjs'
22import { LineController } from 'chart.js'
33
44class LineWithLineController extends LineController {
5+ static override id = 'line-with-line'
6+
57 public override draw ( ) {
68 super . draw ( )
79
8- console . log ( this . chart ?. tooltip ?. active )
9-
10- if ( this . chart ?. tooltip ?. active ) {
10+ if ( this . chart ?. tooltip && this . chart . tooltip . opacity > 0 ) {
1111 const ctx = this . chart . ctx
1212 const x = this . chart . tooltip . x
13- const topY = this . chart . scales [ 'y-axis-0' ] . top
14- const bottomY = this . chart . scales [ 'y-axis-0' ] . bottom
13+ const topY = this . chart . scales . y . top
14+ const bottomY = this . chart . scales . y . bottom
1515
1616 // draw line
1717 ctx . save ( )
@@ -26,6 +26,9 @@ class LineWithLineController extends LineController {
2626 }
2727}
2828
29- const LineWithLineChart = createTypedChart ( 'line' , LineWithLineController )
29+ const LineWithLineChart = createTypedChart (
30+ 'line-with-line' as 'line' ,
31+ LineWithLineController
32+ )
3033
3134export default LineWithLineChart
You can’t perform that action at this time.
0 commit comments