@websy/websy-designs 1.12.5 → 1.12.7
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.
- package/dist/server/helpers/v1/mySqlHelper.js +2 -2
- package/dist/websy-designs-es6.debug.js +50 -26
- package/dist/websy-designs-es6.js +51 -29
- package/dist/websy-designs-es6.min.js +1 -1
- package/dist/websy-designs.debug.js +50 -26
- package/dist/websy-designs.js +51 -29
- package/dist/websy-designs.min.css +1 -1
- package/dist/websy-designs.min.js +1 -1
- package/package.json +1 -1
|
@@ -8716,6 +8716,7 @@ class WebsyChart {
|
|
|
8716
8716
|
this.brushedDomain = []
|
|
8717
8717
|
this.brushBarsInitialized = {}
|
|
8718
8718
|
this.brushLinesInitialized = {}
|
|
8719
|
+
// this.transition = d3.transition().duration(this.options.transitionDuration)
|
|
8719
8720
|
if (!elementId) {
|
|
8720
8721
|
console.log('No element Id provided for Websy Chart')
|
|
8721
8722
|
return
|
|
@@ -9157,7 +9158,7 @@ if (!this.options.data) {
|
|
|
9157
9158
|
}
|
|
9158
9159
|
else {
|
|
9159
9160
|
this.processedX = {}
|
|
9160
|
-
this.transition = d3.transition().duration(this.options.transitionDuration)
|
|
9161
|
+
// this.transition = d3.transition().duration(this.options.transitionDuration)
|
|
9161
9162
|
if (this.options.data.bottom.scale && this.options.data.bottom.scale === 'Time') {
|
|
9162
9163
|
this.parseX = function (input) {
|
|
9163
9164
|
if (typeof input.getTime !== 'undefined') {
|
|
@@ -9174,7 +9175,7 @@ else {
|
|
|
9174
9175
|
}
|
|
9175
9176
|
}
|
|
9176
9177
|
if (this.options.disableTransitions === true) {
|
|
9177
|
-
this.
|
|
9178
|
+
this.options.transitionDuration = 0
|
|
9178
9179
|
}
|
|
9179
9180
|
// Add placeholders for the data entries that don't exist
|
|
9180
9181
|
if (!this.options.data.left) {
|
|
@@ -9197,7 +9198,7 @@ else {
|
|
|
9197
9198
|
this.bottomAxisLayer && this.bottomAxisLayer.attr('class', 'y-axis')
|
|
9198
9199
|
}
|
|
9199
9200
|
const el = document.getElementById(this.elementId)
|
|
9200
|
-
if (el) {
|
|
9201
|
+
if (el && el.clientHeight > 0) {
|
|
9201
9202
|
this.width = el.clientWidth
|
|
9202
9203
|
this.height = el.clientHeight
|
|
9203
9204
|
// establish the space and size for the legend
|
|
@@ -10051,7 +10052,8 @@ let areas = this.areaLayer.selectAll(`.area_${series.key}`)
|
|
|
10051
10052
|
.data([series.data])
|
|
10052
10053
|
// Exit
|
|
10053
10054
|
areas.exit()
|
|
10054
|
-
.transition(
|
|
10055
|
+
.transition()
|
|
10056
|
+
.duration(this.options.transitionDuration)
|
|
10055
10057
|
.style('fill-opacity', 1e-6)
|
|
10056
10058
|
.remove()
|
|
10057
10059
|
// Update
|
|
@@ -10061,7 +10063,8 @@ areas
|
|
|
10061
10063
|
// .attr('transform', 'translate('+ (that.bandWidth/2) +',0)')
|
|
10062
10064
|
.attr('fill', d => d[0].y.color || series.color)
|
|
10063
10065
|
// .attr('stroke', 'transparent')
|
|
10064
|
-
.transition(
|
|
10066
|
+
.transition()
|
|
10067
|
+
.duration(this.options.transitionDuration)
|
|
10065
10068
|
.attr('d', d => drawArea(xAxis, yAxis, series.curveStyle)(d))
|
|
10066
10069
|
// Enter
|
|
10067
10070
|
areas.enter().append('path')
|
|
@@ -10245,7 +10248,8 @@ function getBarY (d, i, yAxis, xAxis) {
|
|
|
10245
10248
|
}
|
|
10246
10249
|
bars
|
|
10247
10250
|
.exit()
|
|
10248
|
-
.transition(
|
|
10251
|
+
.transition()
|
|
10252
|
+
.duration(this.options.transitionDuration)
|
|
10249
10253
|
.style('fill-opacity', 1e-6)
|
|
10250
10254
|
.remove()
|
|
10251
10255
|
|
|
@@ -10254,7 +10258,8 @@ bars
|
|
|
10254
10258
|
.attr('height', (d, i) => getBarHeight.call(this, d, i, yAxis, xAxis))
|
|
10255
10259
|
.attr('x', (d, i) => getBarX.call(this, d, i, yAxis, xAxis))
|
|
10256
10260
|
.attr('y', (d, i) => getBarY.call(this, d, i, yAxis, xAxis))
|
|
10257
|
-
|
|
10261
|
+
.transition()
|
|
10262
|
+
.duration(this.options.transitionDuration)
|
|
10258
10263
|
.attr('fill', d => d.y.color || d.color || series.color)
|
|
10259
10264
|
|
|
10260
10265
|
bars
|
|
@@ -10274,7 +10279,8 @@ if (!this.brushBarsInitialized[series.key]) {
|
|
|
10274
10279
|
this.brushBarsInitialized[series.key] = true
|
|
10275
10280
|
brushBars
|
|
10276
10281
|
.exit()
|
|
10277
|
-
.transition(
|
|
10282
|
+
.transition()
|
|
10283
|
+
.duration(this.options.transitionDuration)
|
|
10278
10284
|
.style('fill-opacity', 1e-6)
|
|
10279
10285
|
.remove()
|
|
10280
10286
|
|
|
@@ -10283,7 +10289,8 @@ if (!this.brushBarsInitialized[series.key]) {
|
|
|
10283
10289
|
.attr('height', (d, i) => getBarHeight.call(this, d, i, `${yAxis}Brush`, `${xAxis}Brush`))
|
|
10284
10290
|
.attr('x', (d, i) => getBarX.call(this, d, i, `${yAxis}Brush`, `${xAxis}Brush`))
|
|
10285
10291
|
.attr('y', (d, i) => getBarY.call(this, d, i, `${yAxis}Brush`, `${xAxis}Brush`))
|
|
10286
|
-
|
|
10292
|
+
.transition()
|
|
10293
|
+
.duration(this.options.transitionDuration)
|
|
10287
10294
|
.attr('fill', d => d.y.color || d.color || series.color)
|
|
10288
10295
|
|
|
10289
10296
|
brushBars
|
|
@@ -10304,12 +10311,14 @@ if (!this.brushBarsInitialized[series.key]) {
|
|
|
10304
10311
|
removebar (key) {
|
|
10305
10312
|
/* global key d3 */
|
|
10306
10313
|
this.barLayer.selectAll(`.bar_${key}`)
|
|
10307
|
-
.transition(
|
|
10314
|
+
// .transition()
|
|
10315
|
+
// .duration(this.options.transitionDuration)
|
|
10308
10316
|
.style('fill-opacity', 1e-6)
|
|
10309
10317
|
.remove()
|
|
10310
10318
|
// remove from the brush as well
|
|
10311
10319
|
this.brushArea.selectAll(`.bar_${key}`)
|
|
10312
|
-
.transition(
|
|
10320
|
+
// .transition()
|
|
10321
|
+
// .duration(this.options.transitionDuration)
|
|
10313
10322
|
.style('fill-opacity', 1e-6)
|
|
10314
10323
|
.remove()
|
|
10315
10324
|
|
|
@@ -10330,7 +10339,8 @@ if (this.options.showLabels === true || series.showLabels === true) {
|
|
|
10330
10339
|
let labels = this.labelLayer.selectAll(`.label_${series.key}`).data(series.data)
|
|
10331
10340
|
labels
|
|
10332
10341
|
.exit()
|
|
10333
|
-
.transition(
|
|
10342
|
+
.transition()
|
|
10343
|
+
.duration(this.options.transitionDuration)
|
|
10334
10344
|
.style('stroke-opacity', 1e-6)
|
|
10335
10345
|
.remove()
|
|
10336
10346
|
labels
|
|
@@ -10344,7 +10354,8 @@ if (this.options.showLabels === true || series.showLabels === true) {
|
|
|
10344
10354
|
return this.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color)
|
|
10345
10355
|
})
|
|
10346
10356
|
.style('font-size', `${this.options.labelSize || this.options.fontSize}px`)
|
|
10347
|
-
.transition(
|
|
10357
|
+
.transition()
|
|
10358
|
+
.duration(this.options.transitionDuration)
|
|
10348
10359
|
.text(d => d.y.label || d.y.value)
|
|
10349
10360
|
.each(function (d, i) {
|
|
10350
10361
|
if (that.options.orientation === 'horizontal') {
|
|
@@ -10533,7 +10544,8 @@ let brushLines = this.brushArea.selectAll(`.line_${series.key}`)
|
|
|
10533
10544
|
.data([series.data])
|
|
10534
10545
|
// Exit
|
|
10535
10546
|
lines.exit()
|
|
10536
|
-
.transition(
|
|
10547
|
+
.transition()
|
|
10548
|
+
.duration(this.options.transitionDuration)
|
|
10537
10549
|
.style('stroke-opacity', 1e-6)
|
|
10538
10550
|
.remove()
|
|
10539
10551
|
// Update
|
|
@@ -10543,7 +10555,8 @@ lines
|
|
|
10543
10555
|
// .attr('transform', 'translate('+ (that.bandWidth/2) +',0)')
|
|
10544
10556
|
.attr('stroke', d => d[0].y.color || series.color)
|
|
10545
10557
|
.attr('fill', 'transparent')
|
|
10546
|
-
.transition(
|
|
10558
|
+
.transition()
|
|
10559
|
+
.duration(this.options.transitionDuration)
|
|
10547
10560
|
.attr('d', d => drawLine(xAxis, yAxis, series.curveStyle)(d))
|
|
10548
10561
|
// Enter
|
|
10549
10562
|
lines.enter().append('path')
|
|
@@ -10561,7 +10574,8 @@ if (!this.brushLinesInitialized[series.key]) {
|
|
|
10561
10574
|
this.brushLinesInitialized[series.key] = true
|
|
10562
10575
|
// Exit
|
|
10563
10576
|
brushLines.exit()
|
|
10564
|
-
.transition(
|
|
10577
|
+
.transition()
|
|
10578
|
+
.duration(this.options.transitionDuration)
|
|
10565
10579
|
.style('stroke-opacity', 1e-6)
|
|
10566
10580
|
.remove()
|
|
10567
10581
|
// Update
|
|
@@ -10571,7 +10585,8 @@ if (!this.brushLinesInitialized[series.key]) {
|
|
|
10571
10585
|
// .attr('transform', 'translate('+ (that.bandWidth/2) +',0)')
|
|
10572
10586
|
.attr('stroke', series.color)
|
|
10573
10587
|
.attr('fill', 'transparent')
|
|
10574
|
-
.transition(
|
|
10588
|
+
.transition()
|
|
10589
|
+
.duration(this.options.transitionDuration)
|
|
10575
10590
|
.attr('d', d => drawLine(xBrushAxis, yBrushAxis, series.curveStyle)(d))
|
|
10576
10591
|
// Enter
|
|
10577
10592
|
brushLines.enter().append('path')
|
|
@@ -10640,11 +10655,13 @@ if (data.label && data.label !== '') {
|
|
|
10640
10655
|
removeline (key) {
|
|
10641
10656
|
/* global key d3 */
|
|
10642
10657
|
let lines = this.lineLayer.selectAll(`.line_${key}`)
|
|
10643
|
-
.transition(
|
|
10658
|
+
// .transition()
|
|
10659
|
+
// .duration(this.options.transitionDuration)
|
|
10644
10660
|
.style('stroke-opacity', 1e-6)
|
|
10645
10661
|
.remove()
|
|
10646
10662
|
let areas = this.areaLayer.selectAll(`.area_${key}`)
|
|
10647
|
-
.transition(
|
|
10663
|
+
// .transition()
|
|
10664
|
+
// .duration(this.options.transitionDuration)
|
|
10648
10665
|
.style('stroke-opacity', 1e-6)
|
|
10649
10666
|
.remove()
|
|
10650
10667
|
|
|
@@ -10652,7 +10669,8 @@ let areas = this.areaLayer.selectAll(`.area_${key}`)
|
|
|
10652
10669
|
removelabel (key) {
|
|
10653
10670
|
/* global key d3 */
|
|
10654
10671
|
let labels = this.labelLayer.selectAll(`.label_${key}`)
|
|
10655
|
-
.transition(
|
|
10672
|
+
// .transition()
|
|
10673
|
+
// .duration(this.options.transitionDuration)
|
|
10656
10674
|
.style('stroke-opacity', 1e-6)
|
|
10657
10675
|
.remove()
|
|
10658
10676
|
|
|
@@ -10660,7 +10678,8 @@ let labels = this.labelLayer.selectAll(`.label_${key}`)
|
|
|
10660
10678
|
removesymbol (key) {
|
|
10661
10679
|
/* global key d3 */
|
|
10662
10680
|
let symbols = this.symbolLayer.selectAll(`.symbol_${key}`)
|
|
10663
|
-
.transition(
|
|
10681
|
+
// .transition()
|
|
10682
|
+
// .duration(this.options.transitionDuration)
|
|
10664
10683
|
.style('stroke-opacity', 1e-6)
|
|
10665
10684
|
.remove()
|
|
10666
10685
|
|
|
@@ -10685,13 +10704,15 @@ let symbols = this.symbolLayer.selectAll(`.symbol_${series.key}`)
|
|
|
10685
10704
|
.data(series.data)
|
|
10686
10705
|
// Exit
|
|
10687
10706
|
symbols.exit()
|
|
10688
|
-
.transition(
|
|
10689
|
-
.
|
|
10707
|
+
// .transition()
|
|
10708
|
+
// .duration(this.options.transitionDuration)
|
|
10709
|
+
// .style('fill-opacity', 1e-6)
|
|
10690
10710
|
.remove()
|
|
10691
10711
|
// Update
|
|
10692
10712
|
symbols
|
|
10693
10713
|
.attr('d', d => drawSymbol(d.y.size || series.symbolSize)(d))
|
|
10694
|
-
.transition(
|
|
10714
|
+
.transition()
|
|
10715
|
+
.duration(this.options.transitionDuration)
|
|
10695
10716
|
.attr('fill', d => series.fillSymbols ? d.y.color || series.color : 'white')
|
|
10696
10717
|
.attr('stroke', d => d.y.color || series.color)
|
|
10697
10718
|
.attr('transform', d => {
|
|
@@ -11488,7 +11509,7 @@ class WebsyKPI {
|
|
|
11488
11509
|
if (this.options.tooltip && this.options.tooltip.value) {
|
|
11489
11510
|
html += `
|
|
11490
11511
|
<div class="websy-info ${this.options.tooltip.classes.join(' ') || ''}" data-info="${this.options.tooltip.value}">
|
|
11491
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512"><
|
|
11512
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512"><path d="M256,56C145.72,56,56,145.72,56,256s89.72,200,200,200,200-89.72,200-200S366.28,56,256,56Zm0,82a26,26,0,1,1-26,26A26,26,0,0,1,256,138Zm48,226H216a16,16,0,0,1,0-32h28V244H228a16,16,0,0,1,0-32h32a16,16,0,0,1,16,16V332h28a16,16,0,0,1,0,32Z"/></svg>
|
|
11492
11513
|
</div>
|
|
11493
11514
|
`
|
|
11494
11515
|
}
|
|
@@ -11698,7 +11719,10 @@ class WebsyMap {
|
|
|
11698
11719
|
// this.map.invalidateSize()
|
|
11699
11720
|
// }
|
|
11700
11721
|
if (this.geo) {
|
|
11701
|
-
this.
|
|
11722
|
+
const b = this.geo.getBounds()
|
|
11723
|
+
if (b.isValid()) {
|
|
11724
|
+
this.map.fitBounds(this.geo.getBounds())
|
|
11725
|
+
}
|
|
11702
11726
|
}
|
|
11703
11727
|
else if (this.polygons) {
|
|
11704
11728
|
// this.map.fitBounds(this.geo.getBounds())
|
package/dist/websy-designs.js
CHANGED
|
@@ -8433,6 +8433,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
8433
8433
|
this.brushedDomain = [];
|
|
8434
8434
|
this.brushBarsInitialized = {};
|
|
8435
8435
|
this.brushLinesInitialized = {};
|
|
8436
|
+
// this.transition = d3.transition().duration(this.options.transitionDuration)
|
|
8436
8437
|
if (!elementId) {
|
|
8437
8438
|
console.log('No element Id provided for Websy Chart');
|
|
8438
8439
|
return;
|
|
@@ -8858,7 +8859,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
8858
8859
|
// tell the user no data has been provided
|
|
8859
8860
|
} else {
|
|
8860
8861
|
this.processedX = {};
|
|
8861
|
-
this.transition = d3.transition().duration(this.options.transitionDuration)
|
|
8862
|
+
// this.transition = d3.transition().duration(this.options.transitionDuration)
|
|
8862
8863
|
if (this.options.data.bottom.scale && this.options.data.bottom.scale === 'Time') {
|
|
8863
8864
|
this.parseX = function (input) {
|
|
8864
8865
|
if (typeof input.getTime !== 'undefined') {
|
|
@@ -8873,7 +8874,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
8873
8874
|
};
|
|
8874
8875
|
}
|
|
8875
8876
|
if (this.options.disableTransitions === true) {
|
|
8876
|
-
this.
|
|
8877
|
+
this.options.transitionDuration = 0;
|
|
8877
8878
|
}
|
|
8878
8879
|
// Add placeholders for the data entries that don't exist
|
|
8879
8880
|
if (!this.options.data.left) {
|
|
@@ -8901,7 +8902,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
8901
8902
|
this.bottomAxisLayer && this.bottomAxisLayer.attr('class', 'y-axis');
|
|
8902
8903
|
}
|
|
8903
8904
|
var el = document.getElementById(this.elementId);
|
|
8904
|
-
if (el) {
|
|
8905
|
+
if (el && el.clientHeight > 0) {
|
|
8905
8906
|
this.width = el.clientWidth;
|
|
8906
8907
|
this.height = el.clientHeight;
|
|
8907
8908
|
// establish the space and size for the legend
|
|
@@ -9621,7 +9622,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9621
9622
|
}
|
|
9622
9623
|
var areas = this.areaLayer.selectAll(".area_".concat(series.key)).data([series.data]);
|
|
9623
9624
|
// Exit
|
|
9624
|
-
areas.exit().transition(this.
|
|
9625
|
+
areas.exit().transition().duration(this.options.transitionDuration).style('fill-opacity', 1e-6).remove();
|
|
9625
9626
|
// Update
|
|
9626
9627
|
areas
|
|
9627
9628
|
// .style('stroke-width', series.lineWidth || this.options.lineWidth)
|
|
@@ -9631,7 +9632,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9631
9632
|
return d[0].y.color || series.color;
|
|
9632
9633
|
})
|
|
9633
9634
|
// .attr('stroke', 'transparent')
|
|
9634
|
-
.transition(this.
|
|
9635
|
+
.transition().duration(this.options.transitionDuration).attr('d', function (d) {
|
|
9635
9636
|
return drawArea(xAxis, yAxis, series.curveStyle)(d);
|
|
9636
9637
|
});
|
|
9637
9638
|
// Enter
|
|
@@ -9816,7 +9817,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9816
9817
|
}
|
|
9817
9818
|
return output;
|
|
9818
9819
|
}
|
|
9819
|
-
bars.exit().transition(this.
|
|
9820
|
+
bars.exit().transition().duration(this.options.transitionDuration).style('fill-opacity', 1e-6).remove();
|
|
9820
9821
|
bars.attr('width', function (d, i) {
|
|
9821
9822
|
return Math.abs(getBarWidth.call(_this64, d, i, yAxis, xAxis));
|
|
9822
9823
|
}).attr('height', function (d, i) {
|
|
@@ -9825,9 +9826,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9825
9826
|
return getBarX.call(_this64, d, i, yAxis, xAxis);
|
|
9826
9827
|
}).attr('y', function (d, i) {
|
|
9827
9828
|
return getBarY.call(_this64, d, i, yAxis, xAxis);
|
|
9828
|
-
})
|
|
9829
|
-
// .transition(this.transition)
|
|
9830
|
-
.attr('fill', function (d) {
|
|
9829
|
+
}).transition().duration(this.options.transitionDuration).attr('fill', function (d) {
|
|
9831
9830
|
return d.y.color || d.color || series.color;
|
|
9832
9831
|
});
|
|
9833
9832
|
bars.enter().append('rect').attr('width', function (d, i) {
|
|
@@ -9847,7 +9846,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9847
9846
|
});
|
|
9848
9847
|
if (!this.brushBarsInitialized[series.key]) {
|
|
9849
9848
|
this.brushBarsInitialized[series.key] = true;
|
|
9850
|
-
brushBars.exit().transition(this.
|
|
9849
|
+
brushBars.exit().transition().duration(this.options.transitionDuration).style('fill-opacity', 1e-6).remove();
|
|
9851
9850
|
brushBars.attr('width', function (d, i) {
|
|
9852
9851
|
return Math.abs(getBarWidth.call(_this64, d, i, "".concat(yAxis, "Brush"), "".concat(xAxis, "Brush")));
|
|
9853
9852
|
}).attr('height', function (d, i) {
|
|
@@ -9856,9 +9855,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9856
9855
|
return getBarX.call(_this64, d, i, "".concat(yAxis, "Brush"), "".concat(xAxis, "Brush"));
|
|
9857
9856
|
}).attr('y', function (d, i) {
|
|
9858
9857
|
return getBarY.call(_this64, d, i, "".concat(yAxis, "Brush"), "".concat(xAxis, "Brush"));
|
|
9859
|
-
})
|
|
9860
|
-
// .transition(this.transition)
|
|
9861
|
-
.attr('fill', function (d) {
|
|
9858
|
+
}).transition().duration(this.options.transitionDuration).attr('fill', function (d) {
|
|
9862
9859
|
return d.y.color || d.color || series.color;
|
|
9863
9860
|
});
|
|
9864
9861
|
brushBars.enter().append('rect').attr('width', function (d, i) {
|
|
@@ -9882,9 +9879,15 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9882
9879
|
key: "removebar",
|
|
9883
9880
|
value: function removebar(key) {
|
|
9884
9881
|
/* global key d3 */
|
|
9885
|
-
this.barLayer.selectAll(".bar_".concat(key))
|
|
9882
|
+
this.barLayer.selectAll(".bar_".concat(key))
|
|
9883
|
+
// .transition()
|
|
9884
|
+
// .duration(this.options.transitionDuration)
|
|
9885
|
+
.style('fill-opacity', 1e-6).remove();
|
|
9886
9886
|
// remove from the brush as well
|
|
9887
|
-
this.brushArea.selectAll(".bar_".concat(key))
|
|
9887
|
+
this.brushArea.selectAll(".bar_".concat(key))
|
|
9888
|
+
// .transition()
|
|
9889
|
+
// .duration(this.options.transitionDuration)
|
|
9890
|
+
.style('fill-opacity', 1e-6).remove();
|
|
9888
9891
|
}
|
|
9889
9892
|
}, {
|
|
9890
9893
|
key: "renderLabels",
|
|
@@ -9903,7 +9906,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9903
9906
|
// e.g. Inside, Outide, Auto (this will also affect the available plot space)
|
|
9904
9907
|
// We currently only support 'Auto'
|
|
9905
9908
|
var labels = this.labelLayer.selectAll(".label_".concat(series.key)).data(series.data);
|
|
9906
|
-
labels.exit().transition(this.
|
|
9909
|
+
labels.exit().transition().duration(this.options.transitionDuration).style('stroke-opacity', 1e-6).remove();
|
|
9907
9910
|
labels.attr('x', function (d) {
|
|
9908
9911
|
return getLabelX.call(_this65, d, series.labelPosition);
|
|
9909
9912
|
}).attr('y', function (d) {
|
|
@@ -9913,7 +9916,7 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
9913
9916
|
return 'transparent';
|
|
9914
9917
|
}
|
|
9915
9918
|
return _this65.options.labelColor || WebsyDesigns.WebsyUtils.getLightDark(d.y.color || d.color || series.color);
|
|
9916
|
-
}).style('font-size', "".concat(this.options.labelSize || this.options.fontSize, "px")).transition(this.
|
|
9919
|
+
}).style('font-size', "".concat(this.options.labelSize || this.options.fontSize, "px")).transition().duration(this.options.transitionDuration).text(function (d) {
|
|
9917
9920
|
return d.y.label || d.y.value;
|
|
9918
9921
|
}).each(function (d, i) {
|
|
9919
9922
|
if (that.options.orientation === 'horizontal') {
|
|
@@ -10073,14 +10076,14 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
10073
10076
|
var lines = this.lineLayer.selectAll(".line_".concat(series.key)).data([series.data]);
|
|
10074
10077
|
var brushLines = this.brushArea.selectAll(".line_".concat(series.key)).data([series.data]);
|
|
10075
10078
|
// Exit
|
|
10076
|
-
lines.exit().transition(this.
|
|
10079
|
+
lines.exit().transition().duration(this.options.transitionDuration).style('stroke-opacity', 1e-6).remove();
|
|
10077
10080
|
// Update
|
|
10078
10081
|
lines.style('stroke-width', series.lineWidth || this.options.lineWidth)
|
|
10079
10082
|
// .attr('id', `line_${series.key}`)
|
|
10080
10083
|
// .attr('transform', 'translate('+ (that.bandWidth/2) +',0)')
|
|
10081
10084
|
.attr('stroke', function (d) {
|
|
10082
10085
|
return d[0].y.color || series.color;
|
|
10083
|
-
}).attr('fill', 'transparent').transition(this.
|
|
10086
|
+
}).attr('fill', 'transparent').transition().duration(this.options.transitionDuration).attr('d', function (d) {
|
|
10084
10087
|
return drawLine(xAxis, yAxis, series.curveStyle)(d);
|
|
10085
10088
|
});
|
|
10086
10089
|
// Enter
|
|
@@ -10096,12 +10099,12 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
10096
10099
|
if (!this.brushLinesInitialized[series.key]) {
|
|
10097
10100
|
this.brushLinesInitialized[series.key] = true;
|
|
10098
10101
|
// Exit
|
|
10099
|
-
brushLines.exit().transition(this.
|
|
10102
|
+
brushLines.exit().transition().duration(this.options.transitionDuration).style('stroke-opacity', 1e-6).remove();
|
|
10100
10103
|
// Update
|
|
10101
10104
|
brushLines.style('stroke-width', 1)
|
|
10102
10105
|
// .attr('id', `line_${series.key}`)
|
|
10103
10106
|
// .attr('transform', 'translate('+ (that.bandWidth/2) +',0)')
|
|
10104
|
-
.attr('stroke', series.color).attr('fill', 'transparent').transition(this.
|
|
10107
|
+
.attr('stroke', series.color).attr('fill', 'transparent').transition().duration(this.options.transitionDuration).attr('d', function (d) {
|
|
10105
10108
|
return drawLine(xBrushAxis, yBrushAxis, series.curveStyle)(d);
|
|
10106
10109
|
});
|
|
10107
10110
|
// Enter
|
|
@@ -10147,20 +10150,32 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
10147
10150
|
key: "removeline",
|
|
10148
10151
|
value: function removeline(key) {
|
|
10149
10152
|
/* global key d3 */
|
|
10150
|
-
var lines = this.lineLayer.selectAll(".line_".concat(key))
|
|
10151
|
-
|
|
10153
|
+
var lines = this.lineLayer.selectAll(".line_".concat(key))
|
|
10154
|
+
// .transition()
|
|
10155
|
+
// .duration(this.options.transitionDuration)
|
|
10156
|
+
.style('stroke-opacity', 1e-6).remove();
|
|
10157
|
+
var areas = this.areaLayer.selectAll(".area_".concat(key))
|
|
10158
|
+
// .transition()
|
|
10159
|
+
// .duration(this.options.transitionDuration)
|
|
10160
|
+
.style('stroke-opacity', 1e-6).remove();
|
|
10152
10161
|
}
|
|
10153
10162
|
}, {
|
|
10154
10163
|
key: "removelabel",
|
|
10155
10164
|
value: function removelabel(key) {
|
|
10156
10165
|
/* global key d3 */
|
|
10157
|
-
var labels = this.labelLayer.selectAll(".label_".concat(key))
|
|
10166
|
+
var labels = this.labelLayer.selectAll(".label_".concat(key))
|
|
10167
|
+
// .transition()
|
|
10168
|
+
// .duration(this.options.transitionDuration)
|
|
10169
|
+
.style('stroke-opacity', 1e-6).remove();
|
|
10158
10170
|
}
|
|
10159
10171
|
}, {
|
|
10160
10172
|
key: "removesymbol",
|
|
10161
10173
|
value: function removesymbol(key) {
|
|
10162
10174
|
/* global key d3 */
|
|
10163
|
-
var symbols = this.symbolLayer.selectAll(".symbol_".concat(key))
|
|
10175
|
+
var symbols = this.symbolLayer.selectAll(".symbol_".concat(key))
|
|
10176
|
+
// .transition()
|
|
10177
|
+
// .duration(this.options.transitionDuration)
|
|
10178
|
+
.style('stroke-opacity', 1e-6).remove();
|
|
10164
10179
|
}
|
|
10165
10180
|
}, {
|
|
10166
10181
|
key: "rendersymbol",
|
|
@@ -10182,11 +10197,15 @@ var WebsyChart = /*#__PURE__*/function () {
|
|
|
10182
10197
|
}
|
|
10183
10198
|
var symbols = this.symbolLayer.selectAll(".symbol_".concat(series.key)).data(series.data);
|
|
10184
10199
|
// Exit
|
|
10185
|
-
symbols.exit()
|
|
10200
|
+
symbols.exit()
|
|
10201
|
+
// .transition()
|
|
10202
|
+
// .duration(this.options.transitionDuration)
|
|
10203
|
+
// .style('fill-opacity', 1e-6)
|
|
10204
|
+
.remove();
|
|
10186
10205
|
// Update
|
|
10187
10206
|
symbols.attr('d', function (d) {
|
|
10188
10207
|
return drawSymbol(d.y.size || series.symbolSize)(d);
|
|
10189
|
-
}).transition(this.
|
|
10208
|
+
}).transition().duration(this.options.transitionDuration).attr('fill', function (d) {
|
|
10190
10209
|
return series.fillSymbols ? d.y.color || series.color : 'white';
|
|
10191
10210
|
}).attr('stroke', function (d) {
|
|
10192
10211
|
return d.y.color || series.color;
|
|
@@ -10970,7 +10989,7 @@ var WebsyKPI = /*#__PURE__*/function () {
|
|
|
10970
10989
|
}
|
|
10971
10990
|
html += " \n <div class=\"websy-kpi-info\">\n <div class=\"websy-kpi-label-container\">\n <div class=\"websy-kpi-label ".concat(this.options.label.classes.join(' ') || '', "\">\n ").concat((this.options.label || {}).value || '', "\n </div>\n ");
|
|
10972
10991
|
if (this.options.tooltip && this.options.tooltip.value) {
|
|
10973
|
-
html += "\n <div class=\"websy-info ".concat(this.options.tooltip.classes.join(' ') || '', "\" data-info=\"").concat(this.options.tooltip.value, "\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 512 512\"><
|
|
10992
|
+
html += "\n <div class=\"websy-info ".concat(this.options.tooltip.classes.join(' ') || '', "\" data-info=\"").concat(this.options.tooltip.value, "\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 512 512\"><path d=\"M256,56C145.72,56,56,145.72,56,256s89.72,200,200,200,200-89.72,200-200S366.28,56,256,56Zm0,82a26,26,0,1,1-26,26A26,26,0,0,1,256,138Zm48,226H216a16,16,0,0,1,0-32h28V244H228a16,16,0,0,1,0-32h32a16,16,0,0,1,16,16V332h28a16,16,0,0,1,0,32Z\"/></svg>\n </div> \n ");
|
|
10974
10993
|
}
|
|
10975
10994
|
html += "\n </div>\n <div class=\"websy-kpi-value ".concat(this.options.value.classes.join(' ') || '', "\">").concat(this.options.value.value, "</div>\n ");
|
|
10976
10995
|
if (this.options.subValue) {
|
|
@@ -11185,7 +11204,10 @@ var WebsyMap = /*#__PURE__*/function () {
|
|
|
11185
11204
|
// this.map.invalidateSize()
|
|
11186
11205
|
// }
|
|
11187
11206
|
if (this.geo) {
|
|
11188
|
-
this.
|
|
11207
|
+
var b = this.geo.getBounds();
|
|
11208
|
+
if (b.isValid()) {
|
|
11209
|
+
this.map.fitBounds(this.geo.getBounds());
|
|
11210
|
+
}
|
|
11189
11211
|
} else if (this.polygons) {
|
|
11190
11212
|
// this.map.fitBounds(this.geo.getBounds())
|
|
11191
11213
|
} else if (this.options.center) {
|