beyond-rails 0.0.224 → 0.0.225
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/src/js/components/LineChart.js +14 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e4265a216a874f0d0601c2ffb2166a1fd7faa9cb5453aa9e23ca0f09a3a4f7f
|
|
4
|
+
data.tar.gz: 8cc3c1212f19a02734fca2dc4b542d67dab8514483952a0ea2725d124c8d5e3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc7afcff18a3f923bb9eb0a30bf48df340add79ed3ac4a20d312061286fb6ba716cdc0a7e813c86143c1c7d0e00780a0589aafad58e6c8861c3f60f61cf77633
|
|
7
|
+
data.tar.gz: 84f4d67e13db8aa0e05662e4d70728126aac064be37f78536b21621de25a1625552942fc1b6ef4695dfc8b40b7b48c5d9ff6dbe0d9455879f05f8aca5d0dc735
|
|
@@ -83,6 +83,10 @@ export default class LineChart {
|
|
|
83
83
|
this.bindPointMouseOver()
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
get noData() {
|
|
87
|
+
return (this.xLabelRows.length === 0) && (this.yLabelRows.length === 0)
|
|
88
|
+
}
|
|
89
|
+
|
|
86
90
|
get contentWidth() {
|
|
87
91
|
return this.width - (this.xPadding * 2) - this.yLabelMargin -
|
|
88
92
|
this.yLabelWidth - (this.xLabelWidth / 2)
|
|
@@ -469,8 +473,13 @@ export default class LineChart {
|
|
|
469
473
|
this.setLabelHeights()
|
|
470
474
|
this.setAxisData()
|
|
471
475
|
this.updateLabelSizeForAutoStep()
|
|
476
|
+
|
|
477
|
+
if (this.noData) {
|
|
478
|
+
return this.raf(() => this.clear())
|
|
479
|
+
}
|
|
480
|
+
|
|
472
481
|
this.setPointPos()
|
|
473
|
-
this.draw()
|
|
482
|
+
this.raf(() => this.draw())
|
|
474
483
|
})
|
|
475
484
|
}
|
|
476
485
|
|
|
@@ -522,6 +531,10 @@ export default class LineChart {
|
|
|
522
531
|
this.setLabelHeights()
|
|
523
532
|
this.setAxisData()
|
|
524
533
|
this.updateLabelSizeForAutoStep()
|
|
534
|
+
|
|
535
|
+
if (this.noData) {
|
|
536
|
+
return this.raf(() => this.clear())
|
|
537
|
+
}
|
|
525
538
|
this.setPointPos()
|
|
526
539
|
this.raf(() => this.draw())
|
|
527
540
|
}
|