billboard.js 3.3.0 → 3.3.3
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/billboard.css +1 -1
- package/dist/billboard.js +489 -399
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2491 -2239
- package/dist/billboard.pkgd.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +166 -103
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +166 -103
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +32 -130
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +32 -130
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2004 -1842
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2168 -1943
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2170 -1945
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2036 -1972
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2037 -1973
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +481 -412
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -4
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +129 -77
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +135 -80
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -7
- package/package.json +28 -28
- package/src/Chart/api/chart.ts +1 -1
- package/src/Chart/api/focus.ts +8 -8
- package/src/Chart/api/regions.ts +3 -3
- package/src/Chart/api/selection.ts +15 -15
- package/src/Chart/api/subchart.ts +10 -10
- package/src/ChartInternal/Axis/Axis.ts +16 -14
- package/src/ChartInternal/ChartInternal.ts +7 -8
- package/src/ChartInternal/data/data.ts +3 -3
- package/src/ChartInternal/data/load.ts +2 -2
- package/src/ChartInternal/interactions/drag.ts +15 -15
- package/src/ChartInternal/interactions/eventrect.ts +18 -18
- package/src/ChartInternal/interactions/interaction.ts +10 -10
- package/src/ChartInternal/interactions/zoom.ts +4 -4
- package/src/ChartInternal/internals/color.ts +4 -4
- package/src/ChartInternal/internals/domain.ts +1 -1
- package/src/ChartInternal/internals/format.ts +9 -4
- package/src/ChartInternal/internals/grid.ts +32 -32
- package/src/ChartInternal/internals/legend.ts +27 -27
- package/src/ChartInternal/internals/redraw.ts +6 -5
- package/src/ChartInternal/internals/region.ts +3 -3
- package/src/ChartInternal/internals/selection.ts +16 -15
- package/src/ChartInternal/internals/size.ts +3 -3
- package/src/ChartInternal/internals/text.ts +8 -8
- package/src/ChartInternal/internals/title.ts +4 -4
- package/src/ChartInternal/internals/tooltip.ts +5 -5
- package/src/ChartInternal/internals/transform.ts +5 -5
- package/src/ChartInternal/shape/arc.ts +22 -22
- package/src/ChartInternal/shape/area.ts +4 -4
- package/src/ChartInternal/shape/bar.ts +7 -7
- package/src/ChartInternal/shape/candlestick.ts +8 -8
- package/src/ChartInternal/shape/gauge.ts +8 -8
- package/src/ChartInternal/shape/line.ts +7 -7
- package/src/ChartInternal/shape/point.ts +18 -18
- package/src/ChartInternal/shape/radar.ts +10 -10
- package/src/ChartInternal/shape/shape.ts +4 -2
- package/src/Plugin/sparkline/index.ts +2 -2
- package/src/Plugin/stanford/index.ts +3 -3
- package/src/Plugin/stanford/util.ts +0 -1
- package/src/config/Options/common/tooltip.ts +10 -1
- package/src/config/classes.ts +154 -66
- package/src/module/util.ts +21 -13
package/dist-esm/billboard.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.3.
|
|
8
|
+
* @version 3.3.3
|
|
9
9
|
*/
|
|
10
10
|
import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
|
|
11
11
|
import { pointer, select, namespaces, selectAll } from 'd3-selection';
|
|
@@ -167,120 +167,6 @@ function __spreadArray(to, from, pack) {
|
|
|
167
167
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
/**
|
|
171
|
-
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
172
|
-
* billboard.js project is licensed under the MIT license
|
|
173
|
-
*/
|
|
174
|
-
/**
|
|
175
|
-
* CSS class names definition
|
|
176
|
-
* @private
|
|
177
|
-
*/
|
|
178
|
-
var CLASS = {
|
|
179
|
-
arc: "bb-arc",
|
|
180
|
-
arcLabelLine: "bb-arc-label-line",
|
|
181
|
-
arcs: "bb-arcs",
|
|
182
|
-
area: "bb-area",
|
|
183
|
-
areas: "bb-areas",
|
|
184
|
-
axis: "bb-axis",
|
|
185
|
-
axisX: "bb-axis-x",
|
|
186
|
-
axisXLabel: "bb-axis-x-label",
|
|
187
|
-
axisY: "bb-axis-y",
|
|
188
|
-
axisY2: "bb-axis-y2",
|
|
189
|
-
axisY2Label: "bb-axis-y2-label",
|
|
190
|
-
axisYLabel: "bb-axis-y-label",
|
|
191
|
-
bar: "bb-bar",
|
|
192
|
-
bars: "bb-bars",
|
|
193
|
-
brush: "bb-brush",
|
|
194
|
-
button: "bb-button",
|
|
195
|
-
buttonZoomReset: "bb-zoom-reset",
|
|
196
|
-
candlestick: "bb-candlestick",
|
|
197
|
-
candlesticks: "bb-candlesticks",
|
|
198
|
-
chart: "bb-chart",
|
|
199
|
-
chartArc: "bb-chart-arc",
|
|
200
|
-
chartArcs: "bb-chart-arcs",
|
|
201
|
-
chartArcsBackground: "bb-chart-arcs-background",
|
|
202
|
-
chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
|
|
203
|
-
chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
|
|
204
|
-
chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
|
|
205
|
-
chartArcsTitle: "bb-chart-arcs-title",
|
|
206
|
-
chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
|
|
207
|
-
chartBar: "bb-chart-bar",
|
|
208
|
-
chartBars: "bb-chart-bars",
|
|
209
|
-
chartCandlestick: "bb-chart-candlestick",
|
|
210
|
-
chartCandlesticks: "bb-chart-candlesticks",
|
|
211
|
-
chartCircles: "bb-chart-circles",
|
|
212
|
-
chartLine: "bb-chart-line",
|
|
213
|
-
chartLines: "bb-chart-lines",
|
|
214
|
-
chartRadar: "bb-chart-radar",
|
|
215
|
-
chartRadars: "bb-chart-radars",
|
|
216
|
-
chartText: "bb-chart-text",
|
|
217
|
-
chartTexts: "bb-chart-texts",
|
|
218
|
-
circle: "bb-circle",
|
|
219
|
-
circles: "bb-circles",
|
|
220
|
-
colorPattern: "bb-color-pattern",
|
|
221
|
-
colorScale: "bb-colorscale",
|
|
222
|
-
defocused: "bb-defocused",
|
|
223
|
-
dragarea: "bb-dragarea",
|
|
224
|
-
empty: "bb-empty",
|
|
225
|
-
eventRect: "bb-event-rect",
|
|
226
|
-
eventRects: "bb-event-rects",
|
|
227
|
-
eventRectsMultiple: "bb-event-rects-multiple",
|
|
228
|
-
eventRectsSingle: "bb-event-rects-single",
|
|
229
|
-
focused: "bb-focused",
|
|
230
|
-
gaugeValue: "bb-gauge-value",
|
|
231
|
-
grid: "bb-grid",
|
|
232
|
-
gridLines: "bb-grid-lines",
|
|
233
|
-
legend: "bb-legend",
|
|
234
|
-
legendBackground: "bb-legend-background",
|
|
235
|
-
legendItem: "bb-legend-item",
|
|
236
|
-
legendItemEvent: "bb-legend-item-event",
|
|
237
|
-
legendItemFocused: "bb-legend-item-focused",
|
|
238
|
-
legendItemHidden: "bb-legend-item-hidden",
|
|
239
|
-
legendItemPoint: "bb-legend-item-point",
|
|
240
|
-
legendItemTile: "bb-legend-item-tile",
|
|
241
|
-
level: "bb-level",
|
|
242
|
-
levels: "bb-levels",
|
|
243
|
-
line: "bb-line",
|
|
244
|
-
lines: "bb-lines",
|
|
245
|
-
main: "bb-main",
|
|
246
|
-
region: "bb-region",
|
|
247
|
-
regions: "bb-regions",
|
|
248
|
-
selectedCircle: "bb-selected-circle",
|
|
249
|
-
selectedCircles: "bb-selected-circles",
|
|
250
|
-
shape: "bb-shape",
|
|
251
|
-
shapes: "bb-shapes",
|
|
252
|
-
stanfordElements: "bb-stanford-elements",
|
|
253
|
-
stanfordLine: "bb-stanford-line",
|
|
254
|
-
stanfordLines: "bb-stanford-lines",
|
|
255
|
-
stanfordRegion: "bb-stanford-region",
|
|
256
|
-
stanfordRegions: "bb-stanford-regions",
|
|
257
|
-
subchart: "bb-subchart",
|
|
258
|
-
target: "bb-target",
|
|
259
|
-
text: "bb-text",
|
|
260
|
-
texts: "bb-texts",
|
|
261
|
-
title: "bb-title",
|
|
262
|
-
tooltip: "bb-tooltip",
|
|
263
|
-
tooltipContainer: "bb-tooltip-container",
|
|
264
|
-
tooltipName: "bb-tooltip-name",
|
|
265
|
-
valueDown: "bb-value-down",
|
|
266
|
-
valueUp: "bb-value-up",
|
|
267
|
-
xgrid: "bb-xgrid",
|
|
268
|
-
xgridFocus: "bb-xgrid-focus",
|
|
269
|
-
xgridLine: "bb-xgrid-line",
|
|
270
|
-
xgridLines: "bb-xgrid-lines",
|
|
271
|
-
xgrids: "bb-xgrids",
|
|
272
|
-
ygrid: "bb-ygrid",
|
|
273
|
-
ygridFocus: "bb-ygrid-focus",
|
|
274
|
-
ygridLine: "bb-ygrid-line",
|
|
275
|
-
ygridLines: "bb-ygrid-lines",
|
|
276
|
-
ygrids: "bb-ygrids",
|
|
277
|
-
zoomBrush: "bb-zoom-brush",
|
|
278
|
-
EXPANDED: "_expanded_",
|
|
279
|
-
SELECTED: "_selected_",
|
|
280
|
-
INCLUDED: "_included_",
|
|
281
|
-
TextOverlapping: "text-overlapping"
|
|
282
|
-
};
|
|
283
|
-
|
|
284
170
|
var isValue = function (v) { return v || v === 0; };
|
|
285
171
|
var isFunction = function (v) { return typeof v === "function"; };
|
|
286
172
|
var isString = function (v) { return typeof v === "string"; };
|
|
@@ -489,7 +375,7 @@ function getBrushSelection(ctx) {
|
|
|
489
375
|
selection = event.selection;
|
|
490
376
|
// check from brush area selection
|
|
491
377
|
}
|
|
492
|
-
else if (main && (selection = main.select("."
|
|
378
|
+
else if (main && (selection = main.select(".bb-brush").node())) {
|
|
493
379
|
selection = brushSelection(selection);
|
|
494
380
|
}
|
|
495
381
|
return selection;
|
|
@@ -509,12 +395,16 @@ function getBoundingRect(node) {
|
|
|
509
395
|
/**
|
|
510
396
|
* Retrun random number
|
|
511
397
|
* @param {boolean} asStr Convert returned value as string
|
|
398
|
+
* @param {number} min Minimum value
|
|
399
|
+
* @param {number} max Maximum value
|
|
512
400
|
* @returns {number|string}
|
|
513
401
|
* @private
|
|
514
402
|
*/
|
|
515
|
-
function getRandom(asStr) {
|
|
403
|
+
function getRandom(asStr, min, max) {
|
|
516
404
|
if (asStr === void 0) { asStr = true; }
|
|
517
|
-
|
|
405
|
+
if (min === void 0) { min = 0; }
|
|
406
|
+
if (max === void 0) { max = 10000; }
|
|
407
|
+
var rand = Math.floor(Math.random() * (max - min) + min);
|
|
518
408
|
return asStr ? String(rand) : rand;
|
|
519
409
|
}
|
|
520
410
|
/**
|
|
@@ -879,18 +769,27 @@ function isTabVisible() {
|
|
|
879
769
|
* @private
|
|
880
770
|
*/
|
|
881
771
|
function convertInputType(mouse, touch) {
|
|
882
|
-
var
|
|
883
|
-
|
|
884
|
-
if (/Mobi/.test(win.navigator.userAgent) && touch) {
|
|
772
|
+
var hasTouch = false;
|
|
773
|
+
if (touch) {
|
|
885
774
|
// Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
775
|
+
if (win.navigator && "maxTouchPoints" in win.navigator) {
|
|
776
|
+
hasTouch = win.navigator.maxTouchPoints > 0;
|
|
777
|
+
// Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
|
|
778
|
+
// On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
|
|
779
|
+
}
|
|
780
|
+
else if ("ontouchmove" in win || (win.DocumentTouch && doc instanceof win.DocumentTouch)) {
|
|
781
|
+
hasTouch = true;
|
|
782
|
+
}
|
|
783
|
+
else {
|
|
784
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
|
|
785
|
+
var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
|
|
786
|
+
if (mQ && mQ.media === "(pointer:coarse)") {
|
|
787
|
+
hasTouch = !!mQ.matches;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
891
790
|
}
|
|
892
|
-
var hasMouse = mouse && !
|
|
893
|
-
return (hasMouse && "mouse") || (
|
|
791
|
+
var hasMouse = mouse && !hasTouch ? ("onmouseover" in win) : false;
|
|
792
|
+
return (hasMouse && "mouse") || (hasTouch && "touch") || null;
|
|
894
793
|
}
|
|
895
794
|
|
|
896
795
|
/**
|
|
@@ -934,6 +833,160 @@ function logError(head, tail) {
|
|
|
934
833
|
throw Error("".concat(prefix, " ").concat(head.replace(/\%c([a-z-]+)/i, "'$1' "), " ").concat(tail));
|
|
935
834
|
}
|
|
936
835
|
|
|
836
|
+
/**
|
|
837
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
838
|
+
* billboard.js project is licensed under the MIT license
|
|
839
|
+
*/
|
|
840
|
+
/**
|
|
841
|
+
* CSS class names definition
|
|
842
|
+
* @private
|
|
843
|
+
*/
|
|
844
|
+
var $COMMON = {
|
|
845
|
+
button: "bb-button",
|
|
846
|
+
chart: "bb-chart",
|
|
847
|
+
empty: "bb-empty",
|
|
848
|
+
main: "bb-main",
|
|
849
|
+
target: "bb-target",
|
|
850
|
+
EXPANDED: "_expanded_"
|
|
851
|
+
};
|
|
852
|
+
var $ARC = {
|
|
853
|
+
arc: "bb-arc",
|
|
854
|
+
arcLabelLine: "bb-arc-label-line",
|
|
855
|
+
arcs: "bb-arcs",
|
|
856
|
+
chartArc: "bb-chart-arc",
|
|
857
|
+
chartArcs: "bb-chart-arcs",
|
|
858
|
+
chartArcsBackground: "bb-chart-arcs-background",
|
|
859
|
+
chartArcsTitle: "bb-chart-arcs-title"
|
|
860
|
+
};
|
|
861
|
+
var $AREA = {
|
|
862
|
+
area: "bb-area",
|
|
863
|
+
areas: "bb-areas"
|
|
864
|
+
};
|
|
865
|
+
var $AXIS = {
|
|
866
|
+
axis: "bb-axis",
|
|
867
|
+
axisX: "bb-axis-x",
|
|
868
|
+
axisXLabel: "bb-axis-x-label",
|
|
869
|
+
axisY: "bb-axis-y",
|
|
870
|
+
axisY2: "bb-axis-y2",
|
|
871
|
+
axisY2Label: "bb-axis-y2-label",
|
|
872
|
+
axisYLabel: "bb-axis-y-label"
|
|
873
|
+
};
|
|
874
|
+
var $BAR = {
|
|
875
|
+
bar: "bb-bar",
|
|
876
|
+
bars: "bb-bars",
|
|
877
|
+
chartBar: "bb-chart-bar",
|
|
878
|
+
chartBars: "bb-chart-bars"
|
|
879
|
+
};
|
|
880
|
+
var $CANDLESTICK = {
|
|
881
|
+
candlestick: "bb-candlestick",
|
|
882
|
+
candlesticks: "bb-candlesticks",
|
|
883
|
+
chartCandlestick: "bb-chart-candlestick",
|
|
884
|
+
chartCandlesticks: "bb-chart-candlesticks",
|
|
885
|
+
valueDown: "bb-value-down",
|
|
886
|
+
valueUp: "bb-value-up"
|
|
887
|
+
};
|
|
888
|
+
var $CIRCLE = {
|
|
889
|
+
chartCircles: "bb-chart-circles",
|
|
890
|
+
circle: "bb-circle",
|
|
891
|
+
circles: "bb-circles"
|
|
892
|
+
};
|
|
893
|
+
var $COLOR = {
|
|
894
|
+
colorPattern: "bb-color-pattern",
|
|
895
|
+
colorScale: "bb-colorscale"
|
|
896
|
+
};
|
|
897
|
+
var $DRAG = {
|
|
898
|
+
dragarea: "bb-dragarea",
|
|
899
|
+
INCLUDED: "_included_"
|
|
900
|
+
};
|
|
901
|
+
var $GAUGE = {
|
|
902
|
+
chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
|
|
903
|
+
chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
|
|
904
|
+
chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
|
|
905
|
+
chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
|
|
906
|
+
gaugeValue: "bb-gauge-value"
|
|
907
|
+
};
|
|
908
|
+
var $LEGEND = {
|
|
909
|
+
legend: "bb-legend",
|
|
910
|
+
legendBackground: "bb-legend-background",
|
|
911
|
+
legendItem: "bb-legend-item",
|
|
912
|
+
legendItemEvent: "bb-legend-item-event",
|
|
913
|
+
legendItemHidden: "bb-legend-item-hidden",
|
|
914
|
+
legendItemPoint: "bb-legend-item-point",
|
|
915
|
+
legendItemTile: "bb-legend-item-tile"
|
|
916
|
+
};
|
|
917
|
+
var $LINE = {
|
|
918
|
+
chartLine: "bb-chart-line",
|
|
919
|
+
chartLines: "bb-chart-lines",
|
|
920
|
+
line: "bb-line",
|
|
921
|
+
lines: "bb-lines"
|
|
922
|
+
};
|
|
923
|
+
var $EVENT = {
|
|
924
|
+
eventRect: "bb-event-rect",
|
|
925
|
+
eventRects: "bb-event-rects",
|
|
926
|
+
eventRectsMultiple: "bb-event-rects-multiple",
|
|
927
|
+
eventRectsSingle: "bb-event-rects-single"
|
|
928
|
+
};
|
|
929
|
+
var $FOCUS = {
|
|
930
|
+
focused: "bb-focused",
|
|
931
|
+
defocused: "bb-defocused",
|
|
932
|
+
legendItemFocused: "bb-legend-item-focused",
|
|
933
|
+
xgridFocus: "bb-xgrid-focus",
|
|
934
|
+
ygridFocus: "bb-ygrid-focus"
|
|
935
|
+
};
|
|
936
|
+
var $GRID = {
|
|
937
|
+
grid: "bb-grid",
|
|
938
|
+
gridLines: "bb-grid-lines",
|
|
939
|
+
xgrid: "bb-xgrid",
|
|
940
|
+
xgridLine: "bb-xgrid-line",
|
|
941
|
+
xgridLines: "bb-xgrid-lines",
|
|
942
|
+
xgrids: "bb-xgrids",
|
|
943
|
+
ygrid: "bb-ygrid",
|
|
944
|
+
ygridLine: "bb-ygrid-line",
|
|
945
|
+
ygridLines: "bb-ygrid-lines",
|
|
946
|
+
ygrids: "bb-ygrids"
|
|
947
|
+
};
|
|
948
|
+
var $RADAR = {
|
|
949
|
+
chartRadar: "bb-chart-radar",
|
|
950
|
+
chartRadars: "bb-chart-radars",
|
|
951
|
+
level: "bb-level",
|
|
952
|
+
levels: "bb-levels"
|
|
953
|
+
};
|
|
954
|
+
var $REGION = {
|
|
955
|
+
region: "bb-region",
|
|
956
|
+
regions: "bb-regions"
|
|
957
|
+
};
|
|
958
|
+
var $SELECT = {
|
|
959
|
+
selectedCircle: "bb-selected-circle",
|
|
960
|
+
selectedCircles: "bb-selected-circles",
|
|
961
|
+
SELECTED: "_selected_"
|
|
962
|
+
};
|
|
963
|
+
var $SHAPE = {
|
|
964
|
+
shape: "bb-shape",
|
|
965
|
+
shapes: "bb-shapes"
|
|
966
|
+
};
|
|
967
|
+
var $SUBCHART = {
|
|
968
|
+
brush: "bb-brush",
|
|
969
|
+
subchart: "bb-subchart"
|
|
970
|
+
};
|
|
971
|
+
var $TEXT = {
|
|
972
|
+
chartText: "bb-chart-text",
|
|
973
|
+
chartTexts: "bb-chart-texts",
|
|
974
|
+
text: "bb-text",
|
|
975
|
+
texts: "bb-texts",
|
|
976
|
+
title: "bb-title",
|
|
977
|
+
TextOverlapping: "text-overlapping"
|
|
978
|
+
};
|
|
979
|
+
var $TOOLTIP = {
|
|
980
|
+
tooltip: "bb-tooltip",
|
|
981
|
+
tooltipContainer: "bb-tooltip-container",
|
|
982
|
+
tooltipName: "bb-tooltip-name"
|
|
983
|
+
};
|
|
984
|
+
var $ZOOM = {
|
|
985
|
+
buttonZoomReset: "bb-zoom-reset",
|
|
986
|
+
zoomBrush: "bb-zoom-brush"
|
|
987
|
+
};
|
|
988
|
+
var CLASS = _assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM);
|
|
989
|
+
|
|
937
990
|
/**
|
|
938
991
|
* Elements class.
|
|
939
992
|
* @class Elements
|
|
@@ -2627,7 +2680,16 @@ var tooltip$2 = {
|
|
|
2627
2680
|
* - `element {SVGElement}`: Tooltip event bound element
|
|
2628
2681
|
* - `pos {object}`: Current position of the tooltip.
|
|
2629
2682
|
* @property {Function|object} [tooltip.contents] Set custom HTML for the tooltip.<br>
|
|
2630
|
-
*
|
|
2683
|
+
* If tooltip.grouped is true, data includes multiple data points.<br><br>
|
|
2684
|
+
* Specified function receives `data` array and `defaultTitleFormat`, `defaultValueFormat` and `color` functions of the data point to show.
|
|
2685
|
+
* - **Note:**
|
|
2686
|
+
* - defaultTitleFormat:
|
|
2687
|
+
* - if `axis.x.tick.format` option will be used if set.
|
|
2688
|
+
* - otherwise, will return funciton based on tick format type(category, timeseries).
|
|
2689
|
+
* - defaultValueFormat:
|
|
2690
|
+
* - for Arc type (except gauge, radar), the function will return value from `(ratio * 100).toFixed(1)`.
|
|
2691
|
+
* - for Axis based types, will be used `axis.[y|y2].tick.format` option value if is set.
|
|
2692
|
+
* - otherwise, will parse value and return as number.
|
|
2631
2693
|
* @property {string|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.
|
|
2632
2694
|
* - **NOTE:** When is specified, will not be updating tooltip's position.
|
|
2633
2695
|
* @property {string} [tooltip.contents.template=undefined] Set tooltip's template.<br><br>
|
|
@@ -3899,8 +3961,8 @@ var data$1 = {
|
|
|
3899
3961
|
.filter(function (v) { return $$.isBarType(v.id) || $$.isCandlestickType(v.id); })
|
|
3900
3962
|
.forEach(function (v) {
|
|
3901
3963
|
var selector = $$.isBarType(v.id) ?
|
|
3902
|
-
".".concat(
|
|
3903
|
-
".".concat(
|
|
3964
|
+
".".concat($BAR.chartBar, ".").concat($COMMON.target).concat($$.getTargetSelectorSuffix(v.id), " .").concat($BAR.bar, "-").concat(v.index) :
|
|
3965
|
+
".".concat($CANDLESTICK.chartCandlestick, ".").concat($COMMON.target).concat($$.getTargetSelectorSuffix(v.id), " .").concat($CANDLESTICK.candlestick, "-").concat(v.index, " path");
|
|
3904
3966
|
if (!closest && $$.isWithinBar(main.select(selector).node())) {
|
|
3905
3967
|
closest = v;
|
|
3906
3968
|
}
|
|
@@ -4203,7 +4265,7 @@ var dataLoad = {
|
|
|
4203
4265
|
state.withoutFadeIn[id] = false;
|
|
4204
4266
|
// Remove target's elements
|
|
4205
4267
|
if ($el.legend) {
|
|
4206
|
-
$el.legend.selectAll(".".concat(
|
|
4268
|
+
$el.legend.selectAll(".".concat($LEGEND.legendItem).concat($$.getTargetSelectorSuffix(id))).remove();
|
|
4207
4269
|
}
|
|
4208
4270
|
// Remove target
|
|
4209
4271
|
$$.data.targets = $$.data.targets.filter(function (t) { return t.id !== id; });
|
|
@@ -4234,10 +4296,10 @@ var interaction = {
|
|
|
4234
4296
|
return;
|
|
4235
4297
|
}
|
|
4236
4298
|
}
|
|
4237
|
-
main.selectAll(".".concat(
|
|
4299
|
+
main.selectAll(".".concat($SHAPE.shape, "-").concat(index))
|
|
4238
4300
|
.each(function () {
|
|
4239
4301
|
var _a;
|
|
4240
|
-
select(this).classed(
|
|
4302
|
+
select(this).classed($COMMON.EXPANDED, true);
|
|
4241
4303
|
if (isSelectionEnabled) {
|
|
4242
4304
|
eventRect.style("cursor", isSelectionGrouped ? "pointer" : null);
|
|
4243
4305
|
}
|
|
@@ -4294,8 +4356,8 @@ var interaction = {
|
|
|
4294
4356
|
["bar", "candlestick"]
|
|
4295
4357
|
.filter(function (v) { return $$.$el[v]; })
|
|
4296
4358
|
.forEach(function (v) {
|
|
4297
|
-
reset && $$.$el[v].classed(
|
|
4298
|
-
$$.getShapeByIndex(v, i, id).classed(
|
|
4359
|
+
reset && $$.$el[v].classed($COMMON.EXPANDED, false);
|
|
4360
|
+
$$.getShapeByIndex(v, i, id).classed($COMMON.EXPANDED, expand);
|
|
4299
4361
|
});
|
|
4300
4362
|
},
|
|
4301
4363
|
/**
|
|
@@ -4313,11 +4375,11 @@ var interaction = {
|
|
|
4313
4375
|
var callback_1 = config[isOver ? "data_onover" : "data_onout"].bind($$.api);
|
|
4314
4376
|
config.color_onover && $$.setOverColor(isOver, d, isArc);
|
|
4315
4377
|
if (isArc) {
|
|
4316
|
-
callback_1(d, main.select(".".concat(
|
|
4378
|
+
callback_1(d, main.select(".".concat($ARC.arc).concat($$.getTargetSelectorSuffix(d.id))).node());
|
|
4317
4379
|
}
|
|
4318
4380
|
else if (!config.tooltip_grouped) {
|
|
4319
4381
|
var last_1 = $$.cache.get(KEY.setOverOut) || [];
|
|
4320
|
-
var shape = main.selectAll(".".concat(
|
|
4382
|
+
var shape = main.selectAll(".".concat($SHAPE.shape, "-").concat(d))
|
|
4321
4383
|
.filter(function (d) {
|
|
4322
4384
|
return $$.isWithinShape(this, d);
|
|
4323
4385
|
});
|
|
@@ -4342,7 +4404,7 @@ var interaction = {
|
|
|
4342
4404
|
$$.showCircleFocus($$.getAllValuesOnIndex(d, true)) :
|
|
4343
4405
|
$$.setExpand(d, null, true);
|
|
4344
4406
|
}
|
|
4345
|
-
!$$.isMultipleX() && main.selectAll(".".concat(
|
|
4407
|
+
!$$.isMultipleX() && main.selectAll(".".concat($SHAPE.shape, "-").concat(d))
|
|
4346
4408
|
.each(function (d) {
|
|
4347
4409
|
callback_1(d, this);
|
|
4348
4410
|
});
|
|
@@ -4397,7 +4459,7 @@ var interaction = {
|
|
|
4397
4459
|
var $$ = this;
|
|
4398
4460
|
var config = $$.config, _a = $$.state, eventReceiver = _a.eventReceiver, hasAxis = _a.hasAxis, hasRadar = _a.hasRadar, _b = $$.$el, eventRect = _b.eventRect, arcs = _b.arcs, radar = _b.radar;
|
|
4399
4461
|
var isMultipleX = $$.isMultipleX();
|
|
4400
|
-
var element = (hasRadar ? radar.axes.select(".".concat(
|
|
4462
|
+
var element = (hasRadar ? radar.axes.select(".".concat($AXIS.axis, "-").concat(index, " text")) : (eventRect || arcs.selectAll(".".concat($COMMON.target, " path")).filter(function (d, i) { return i === index; }))).node();
|
|
4401
4463
|
var _c = element.getBoundingClientRect(), width = _c.width, left = _c.left, top = _c.top;
|
|
4402
4464
|
if (hasAxis && !hasRadar && !isMultipleX) {
|
|
4403
4465
|
var coords = eventReceiver.coords[index];
|
|
@@ -4616,7 +4678,7 @@ var color = {
|
|
|
4616
4678
|
if (!pattern) {
|
|
4617
4679
|
var delimiter = ";";
|
|
4618
4680
|
var span = doc.createElement("span");
|
|
4619
|
-
span.className =
|
|
4681
|
+
span.className = $COLOR.colorPattern;
|
|
4620
4682
|
span.style.display = "none";
|
|
4621
4683
|
body.appendChild(span);
|
|
4622
4684
|
var content = win.getComputedStyle(span).backgroundImage;
|
|
@@ -4753,8 +4815,8 @@ var color = {
|
|
|
4753
4815
|
}
|
|
4754
4816
|
main.selectAll(isObject(d) ?
|
|
4755
4817
|
// when is Arc type
|
|
4756
|
-
".".concat(
|
|
4757
|
-
".".concat(
|
|
4818
|
+
".".concat($ARC.arc).concat($$.getTargetSelectorSuffix(d.id)) :
|
|
4819
|
+
".".concat($SHAPE.shape, "-").concat(d)).style("fill", color);
|
|
4758
4820
|
}
|
|
4759
4821
|
};
|
|
4760
4822
|
|
|
@@ -4842,7 +4904,7 @@ var domain = {
|
|
|
4842
4904
|
var yDomainMax = $$.getYDomainMinMax(yTargets, "max");
|
|
4843
4905
|
var isZeroBased = __spreadArray([TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER], TYPE_BY_CATEGORY.Line, true).some(function (v) {
|
|
4844
4906
|
var type = v.indexOf("area") > -1 ? "area" : v;
|
|
4845
|
-
return $$.hasType(v, yTargets) && config["".concat(type, "_zerobased")];
|
|
4907
|
+
return $$.hasType(v, yTargets, true) && config["".concat(type, "_zerobased")];
|
|
4846
4908
|
});
|
|
4847
4909
|
// MEMO: avoid inverting domain unexpectedly
|
|
4848
4910
|
yDomainMin = isValue(yMin) ? yMin :
|
|
@@ -5111,10 +5173,12 @@ var format = {
|
|
|
5111
5173
|
*/
|
|
5112
5174
|
getDefaultValueFormat: function () {
|
|
5113
5175
|
var $$ = this;
|
|
5114
|
-
var
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
$$.
|
|
5176
|
+
var defaultArcValueFormat = $$.defaultArcValueFormat, yFormat = $$.yFormat, y2Format = $$.y2Format;
|
|
5177
|
+
var hasArc = $$.hasArcType(null, ["gauge", "radar"]);
|
|
5178
|
+
return function (v, ratio, id) {
|
|
5179
|
+
var format = hasArc ? defaultArcValueFormat : ($$.axis && $$.axis.getId(id) === "y2" ? y2Format : yFormat);
|
|
5180
|
+
return format.call($$, v, ratio);
|
|
5181
|
+
};
|
|
5118
5182
|
},
|
|
5119
5183
|
defaultValueFormat: function (v) {
|
|
5120
5184
|
return isValue(v) ? +v : "";
|
|
@@ -5161,7 +5225,7 @@ var legend$1 = {
|
|
|
5161
5225
|
if (config.legend_show) {
|
|
5162
5226
|
if (!config.legend_contents_bindto) {
|
|
5163
5227
|
$el.legend = $$.$el.svg.append("g")
|
|
5164
|
-
.classed(
|
|
5228
|
+
.classed($LEGEND.legend, true)
|
|
5165
5229
|
.attr("transform", $$.getTranslate("legend"));
|
|
5166
5230
|
}
|
|
5167
5231
|
// MEMO: call here to update legend box and translate for all
|
|
@@ -5196,8 +5260,8 @@ var legend$1 = {
|
|
|
5196
5260
|
$$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz, transitions);
|
|
5197
5261
|
}
|
|
5198
5262
|
// toggle legend state
|
|
5199
|
-
$el.legend.selectAll(".".concat(
|
|
5200
|
-
.classed(
|
|
5263
|
+
$el.legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5264
|
+
.classed($LEGEND.legendItemHidden, function (id) {
|
|
5201
5265
|
var hide = !$$.isTargetToShow(id);
|
|
5202
5266
|
if (hide) {
|
|
5203
5267
|
this.style.opacity = null;
|
|
@@ -5313,7 +5377,7 @@ var legend$1 = {
|
|
|
5313
5377
|
updateLegendItemColor: function (id, color) {
|
|
5314
5378
|
var legend = this.$el.legend;
|
|
5315
5379
|
if (legend) {
|
|
5316
|
-
legend.select(".".concat(
|
|
5380
|
+
legend.select(".".concat($LEGEND.legendItem, "-").concat(id, " line"))
|
|
5317
5381
|
.style("stroke", color);
|
|
5318
5382
|
}
|
|
5319
5383
|
},
|
|
@@ -5346,7 +5410,7 @@ var legend$1 = {
|
|
|
5346
5410
|
* @private
|
|
5347
5411
|
*/
|
|
5348
5412
|
opacityForUnfocusedLegend: function (legendItem) {
|
|
5349
|
-
return legendItem.classed(
|
|
5413
|
+
return legendItem.classed($LEGEND.legendItemHidden) ? null : "0.3";
|
|
5350
5414
|
},
|
|
5351
5415
|
/**
|
|
5352
5416
|
* Toggles the focus of the legend
|
|
@@ -5358,9 +5422,9 @@ var legend$1 = {
|
|
|
5358
5422
|
var $$ = this;
|
|
5359
5423
|
var legend = $$.$el.legend, $T = $$.$T;
|
|
5360
5424
|
var targetIdz = $$.mapToTargetIds(targetIds);
|
|
5361
|
-
legend && $T(legend.selectAll(".".concat(
|
|
5425
|
+
legend && $T(legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5362
5426
|
.filter(function (id) { return targetIdz.indexOf(id) >= 0; })
|
|
5363
|
-
.classed(
|
|
5427
|
+
.classed($FOCUS.legendItemFocused, focus))
|
|
5364
5428
|
.style("opacity", function () {
|
|
5365
5429
|
return focus ? null :
|
|
5366
5430
|
$$.opacityForUnfocusedLegend.call($$, select(this));
|
|
@@ -5373,8 +5437,8 @@ var legend$1 = {
|
|
|
5373
5437
|
revertLegend: function () {
|
|
5374
5438
|
var $$ = this;
|
|
5375
5439
|
var legend = $$.$el.legend, $T = $$.$T;
|
|
5376
|
-
legend && $T(legend.selectAll(".".concat(
|
|
5377
|
-
.classed(
|
|
5440
|
+
legend && $T(legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5441
|
+
.classed($FOCUS.legendItemFocused, false))
|
|
5378
5442
|
.style("opacity", null);
|
|
5379
5443
|
},
|
|
5380
5444
|
/**
|
|
@@ -5429,7 +5493,7 @@ var legend$1 = {
|
|
|
5429
5493
|
if (id) {
|
|
5430
5494
|
data = (!state.redrawing && cache.get(cacheKey)) || {};
|
|
5431
5495
|
if (!data[id]) {
|
|
5432
|
-
data[id] = $$.getTextRect(textElement,
|
|
5496
|
+
data[id] = $$.getTextRect(textElement, $LEGEND.legendItem);
|
|
5433
5497
|
cache.add(cacheKey, data);
|
|
5434
5498
|
}
|
|
5435
5499
|
data = data[id];
|
|
@@ -5450,7 +5514,7 @@ var legend$1 = {
|
|
|
5450
5514
|
.attr("class", function (id) {
|
|
5451
5515
|
var node = select(this);
|
|
5452
5516
|
var itemClass = (!node.empty() && node.attr("class")) || "";
|
|
5453
|
-
return itemClass + $$.generateClass(
|
|
5517
|
+
return itemClass + $$.generateClass($LEGEND.legendItem, id);
|
|
5454
5518
|
})
|
|
5455
5519
|
.style("visibility", function (id) { return ($$.isLegendToShow(id) ? null : "hidden"); });
|
|
5456
5520
|
if (config.interaction_enabled) {
|
|
@@ -5465,7 +5529,7 @@ var legend$1 = {
|
|
|
5465
5529
|
else {
|
|
5466
5530
|
api.toggle(id);
|
|
5467
5531
|
select(this)
|
|
5468
|
-
.classed(
|
|
5532
|
+
.classed($FOCUS.legendItemFocused, false);
|
|
5469
5533
|
}
|
|
5470
5534
|
}
|
|
5471
5535
|
isTouch && $$.hideTooltip();
|
|
@@ -5473,18 +5537,18 @@ var legend$1 = {
|
|
|
5473
5537
|
!isTouch && item
|
|
5474
5538
|
.on("mouseout", function (event, id) {
|
|
5475
5539
|
if (!callFn(config.legend_item_onout, api, id)) {
|
|
5476
|
-
select(this).classed(
|
|
5540
|
+
select(this).classed($FOCUS.legendItemFocused, false);
|
|
5477
5541
|
if (hasGauge) {
|
|
5478
|
-
$$.undoMarkOverlapped($$, ".".concat(
|
|
5542
|
+
$$.undoMarkOverlapped($$, ".".concat($GAUGE.gaugeValue));
|
|
5479
5543
|
}
|
|
5480
5544
|
$$.api.revert();
|
|
5481
5545
|
}
|
|
5482
5546
|
})
|
|
5483
5547
|
.on("mouseover", function (event, id) {
|
|
5484
5548
|
if (!callFn(config.legend_item_onover, api, id)) {
|
|
5485
|
-
select(this).classed(
|
|
5549
|
+
select(this).classed($FOCUS.legendItemFocused, true);
|
|
5486
5550
|
if (hasGauge) {
|
|
5487
|
-
$$.markOverlapped(id, $$, ".".concat(
|
|
5551
|
+
$$.markOverlapped(id, $$, ".".concat($GAUGE.gaugeValue));
|
|
5488
5552
|
}
|
|
5489
5553
|
if (!state.transiting && $$.isTargetToShow(id)) {
|
|
5490
5554
|
api.focus(id);
|
|
@@ -5612,7 +5676,7 @@ var legend$1 = {
|
|
|
5612
5676
|
var yForLegendTile = function (id, i) { return yForLegend(id, i) + 4; };
|
|
5613
5677
|
var pos = -200;
|
|
5614
5678
|
// Define g for legend area
|
|
5615
|
-
var l = legend.selectAll(".".concat(
|
|
5679
|
+
var l = legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5616
5680
|
.data(targetIdz)
|
|
5617
5681
|
.enter()
|
|
5618
5682
|
.append("g");
|
|
@@ -5626,7 +5690,7 @@ var legend$1 = {
|
|
|
5626
5690
|
.attr("x", isLegendRightOrInset ? xForLegendText : pos)
|
|
5627
5691
|
.attr("y", isLegendRightOrInset ? pos : yForLegendText);
|
|
5628
5692
|
l.append("rect")
|
|
5629
|
-
.attr("class",
|
|
5693
|
+
.attr("class", $LEGEND.legendItemEvent)
|
|
5630
5694
|
.style("fill-opacity", "0")
|
|
5631
5695
|
.attr("x", isLegendRightOrInset ? xForLegendRect : pos)
|
|
5632
5696
|
.attr("y", isLegendRightOrInset ? pos : yForLegendRect);
|
|
@@ -5649,7 +5713,7 @@ var legend$1 = {
|
|
|
5649
5713
|
}
|
|
5650
5714
|
return doc.createElementNS(namespaces.svg, ("hasValidPointType" in $$) && $$.hasValidPointType(point) ? point : "use");
|
|
5651
5715
|
})
|
|
5652
|
-
.attr("class",
|
|
5716
|
+
.attr("class", $LEGEND.legendItemPoint)
|
|
5653
5717
|
.style("fill", getColor)
|
|
5654
5718
|
.style("pointer-events", "none")
|
|
5655
5719
|
.attr("href", function (data, idx, selection) {
|
|
@@ -5661,7 +5725,7 @@ var legend$1 = {
|
|
|
5661
5725
|
}
|
|
5662
5726
|
else {
|
|
5663
5727
|
l.append("line")
|
|
5664
|
-
.attr("class",
|
|
5728
|
+
.attr("class", $LEGEND.legendItemTile)
|
|
5665
5729
|
.style("stroke", getColor)
|
|
5666
5730
|
.style("pointer-events", "none")
|
|
5667
5731
|
.attr("x1", isLegendRightOrInset ? x1ForLegendTile : pos)
|
|
@@ -5671,10 +5735,10 @@ var legend$1 = {
|
|
|
5671
5735
|
.attr("stroke-width", config.legend_item_tile_height);
|
|
5672
5736
|
}
|
|
5673
5737
|
// Set background for inset legend
|
|
5674
|
-
background = legend.select(".".concat(
|
|
5738
|
+
background = legend.select(".".concat($LEGEND.legendBackground, " rect"));
|
|
5675
5739
|
if (state.isLegendInset && maxWidth > 0 && background.size() === 0) {
|
|
5676
|
-
background = legend.insert("g", ".".concat(
|
|
5677
|
-
.attr("class",
|
|
5740
|
+
background = legend.insert("g", ".".concat($LEGEND.legendItem))
|
|
5741
|
+
.attr("class", $LEGEND.legendBackground)
|
|
5678
5742
|
.append("rect");
|
|
5679
5743
|
}
|
|
5680
5744
|
var texts = legend.selectAll("text")
|
|
@@ -5686,7 +5750,7 @@ var legend$1 = {
|
|
|
5686
5750
|
$T(texts, withTransition)
|
|
5687
5751
|
.attr("x", xForLegendText)
|
|
5688
5752
|
.attr("y", yForLegendText);
|
|
5689
|
-
var rects = legend.selectAll("rect.".concat(
|
|
5753
|
+
var rects = legend.selectAll("rect.".concat($LEGEND.legendItemEvent))
|
|
5690
5754
|
.data(targetIdz);
|
|
5691
5755
|
$T(rects, withTransition)
|
|
5692
5756
|
.attr("width", function (id) { return widths[id]; })
|
|
@@ -5694,7 +5758,7 @@ var legend$1 = {
|
|
|
5694
5758
|
.attr("x", xForLegendRect)
|
|
5695
5759
|
.attr("y", yForLegendRect);
|
|
5696
5760
|
if (usePoint) {
|
|
5697
|
-
var tiles = legend.selectAll(".".concat(
|
|
5761
|
+
var tiles = legend.selectAll(".".concat($LEGEND.legendItemPoint))
|
|
5698
5762
|
.data(targetIdz);
|
|
5699
5763
|
$T(tiles, withTransition)
|
|
5700
5764
|
.each(function () {
|
|
@@ -5730,7 +5794,7 @@ var legend$1 = {
|
|
|
5730
5794
|
});
|
|
5731
5795
|
}
|
|
5732
5796
|
else {
|
|
5733
|
-
var tiles = legend.selectAll("line.".concat(
|
|
5797
|
+
var tiles = legend.selectAll("line.".concat($LEGEND.legendItemTile))
|
|
5734
5798
|
.data(targetIdz);
|
|
5735
5799
|
$T(tiles, withTransition)
|
|
5736
5800
|
.style("stroke", getColor)
|
|
@@ -5790,7 +5854,7 @@ var redraw = {
|
|
|
5790
5854
|
// @TODO: Make 'init' state to be accessible everywhere not passing as argument.
|
|
5791
5855
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
5792
5856
|
// Data empty label positioning and text.
|
|
5793
|
-
config.data_empty_label_text && main.select("text.".concat(
|
|
5857
|
+
config.data_empty_label_text && main.select("text.".concat($TEXT.text, ".").concat($COMMON.empty))
|
|
5794
5858
|
.attr("x", state.width / 2)
|
|
5795
5859
|
.attr("y", state.height / 2)
|
|
5796
5860
|
.text(config.data_empty_label_text)
|
|
@@ -5806,7 +5870,7 @@ var redraw = {
|
|
|
5806
5870
|
}
|
|
5807
5871
|
});
|
|
5808
5872
|
// circles for select
|
|
5809
|
-
$el.text && main.selectAll(".".concat(
|
|
5873
|
+
$el.text && main.selectAll(".".concat($SELECT.selectedCircles))
|
|
5810
5874
|
.filter($$.isBarType.bind($$))
|
|
5811
5875
|
.selectAll("circle")
|
|
5812
5876
|
.remove();
|
|
@@ -5951,7 +6015,8 @@ var redraw = {
|
|
|
5951
6015
|
redrawWithoutRescale: function () {
|
|
5952
6016
|
this.redraw({
|
|
5953
6017
|
withY: false,
|
|
5954
|
-
|
|
6018
|
+
withDimension: false,
|
|
6019
|
+
withLegend: false,
|
|
5955
6020
|
withSubchart: false,
|
|
5956
6021
|
withEventRect: false,
|
|
5957
6022
|
withTransitionForAxis: false
|
|
@@ -6345,9 +6410,11 @@ var shape = {
|
|
|
6345
6410
|
*/
|
|
6346
6411
|
getShapeYMin: function (id) {
|
|
6347
6412
|
var $$ = this;
|
|
6348
|
-
var
|
|
6413
|
+
var axisId = $$.axis.getId(id);
|
|
6414
|
+
var scale = $$.scale[axisId];
|
|
6349
6415
|
var yMin = scale.domain()[0];
|
|
6350
|
-
|
|
6416
|
+
var inverted = $$.config["axis_".concat(axisId, "_inverted")];
|
|
6417
|
+
return !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;
|
|
6351
6418
|
},
|
|
6352
6419
|
/**
|
|
6353
6420
|
* Get Shape's offset data
|
|
@@ -6686,7 +6753,7 @@ var size = {
|
|
|
6686
6753
|
var $$ = this;
|
|
6687
6754
|
var config = $$.config, $el = $$.$el;
|
|
6688
6755
|
var hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner);
|
|
6689
|
-
var leftAxisClass = config.axis_rotated ?
|
|
6756
|
+
var leftAxisClass = config.axis_rotated ? $AXIS.axisX : $AXIS.axisY;
|
|
6690
6757
|
var leftAxis = $el.main.select(".".concat(leftAxisClass)).node();
|
|
6691
6758
|
var svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 };
|
|
6692
6759
|
var chartRect = $el.chart.node().getBoundingClientRect();
|
|
@@ -6714,7 +6781,7 @@ var size = {
|
|
|
6714
6781
|
.attr("width", current.width)
|
|
6715
6782
|
.attr("height", current.height);
|
|
6716
6783
|
if (hasAxis) {
|
|
6717
|
-
var brush = svg.select(".".concat(
|
|
6784
|
+
var brush = svg.select(".".concat($SUBCHART.brush, " .overlay"));
|
|
6718
6785
|
var brushSize = { width: 0, height: 0 };
|
|
6719
6786
|
if (brush.size()) {
|
|
6720
6787
|
brushSize.width = +brush.attr("width");
|
|
@@ -6867,8 +6934,8 @@ var text = {
|
|
|
6867
6934
|
*/
|
|
6868
6935
|
initText: function () {
|
|
6869
6936
|
var $el = this.$el;
|
|
6870
|
-
$el.main.select(".".concat(
|
|
6871
|
-
.attr("class",
|
|
6937
|
+
$el.main.select(".".concat($COMMON.chart)).append("g")
|
|
6938
|
+
.attr("class", $TEXT.chartTexts);
|
|
6872
6939
|
},
|
|
6873
6940
|
/**
|
|
6874
6941
|
* Update chartText
|
|
@@ -6880,7 +6947,7 @@ var text = {
|
|
|
6880
6947
|
var classChartText = $$.getChartClass("Text");
|
|
6881
6948
|
var classTexts = $$.getClass("texts", "id");
|
|
6882
6949
|
var classFocus = $$.classFocus.bind($$);
|
|
6883
|
-
var mainTextUpdate = $$.$el.main.select(".".concat(
|
|
6950
|
+
var mainTextUpdate = $$.$el.main.select(".".concat($TEXT.chartTexts)).selectAll(".".concat($TEXT.chartText))
|
|
6884
6951
|
.data(targets)
|
|
6885
6952
|
.attr("class", function (d) { return classChartText(d) + classFocus(d); });
|
|
6886
6953
|
var mainTextEnter = mainTextUpdate.enter().append("g")
|
|
@@ -6898,8 +6965,8 @@ var text = {
|
|
|
6898
6965
|
var $$ = this;
|
|
6899
6966
|
var $el = $$.$el, $T = $$.$T, config = $$.config;
|
|
6900
6967
|
var classText = $$.getClass("text", "index");
|
|
6901
|
-
var text = $el.main.selectAll(".".concat(
|
|
6902
|
-
.selectAll(".".concat(
|
|
6968
|
+
var text = $el.main.selectAll(".".concat($TEXT.texts))
|
|
6969
|
+
.selectAll(".".concat($TEXT.text))
|
|
6903
6970
|
.data($$.labelishData.bind($$));
|
|
6904
6971
|
$T(text.exit())
|
|
6905
6972
|
.style("fill-opacity", "0")
|
|
@@ -7253,7 +7320,7 @@ var text = {
|
|
|
7253
7320
|
Math.ceil(nodeForWidth.node().getComputedTextLength());
|
|
7254
7321
|
var overlapsY = Math.ceil(Math.abs(translate.f - coordinate.f)) <
|
|
7255
7322
|
parseInt(textNode.style("font-size"), 10);
|
|
7256
|
-
filteredTextNode.classed(
|
|
7323
|
+
filteredTextNode.classed($TEXT.TextOverlapping, overlapsX && overlapsY);
|
|
7257
7324
|
});
|
|
7258
7325
|
},
|
|
7259
7326
|
/**
|
|
@@ -7267,7 +7334,7 @@ var text = {
|
|
|
7267
7334
|
$$.$el.arcs.selectAll(selector)
|
|
7268
7335
|
.each(function () {
|
|
7269
7336
|
selectAll([this, this.previousSibling])
|
|
7270
|
-
.classed(
|
|
7337
|
+
.classed($TEXT.TextOverlapping, false);
|
|
7271
7338
|
});
|
|
7272
7339
|
},
|
|
7273
7340
|
/**
|
|
@@ -7325,7 +7392,7 @@ var title = {
|
|
|
7325
7392
|
var text = $el.title
|
|
7326
7393
|
.append("text")
|
|
7327
7394
|
.style("text-anchor", getTextPos(config.title_position))
|
|
7328
|
-
.attr("class",
|
|
7395
|
+
.attr("class", $TEXT.title);
|
|
7329
7396
|
setTextValue(text, config.title_text, [0.3, 1.5]);
|
|
7330
7397
|
}
|
|
7331
7398
|
},
|
|
@@ -7355,7 +7422,7 @@ var title = {
|
|
|
7355
7422
|
var $$ = this;
|
|
7356
7423
|
var config = $$.config, current = $$.state.current;
|
|
7357
7424
|
var position = config.title_position || "left";
|
|
7358
|
-
var textRectWidth = $$.getTextRect($$.$el.title,
|
|
7425
|
+
var textRectWidth = $$.getTextRect($$.$el.title, $TEXT.title).width;
|
|
7359
7426
|
var x;
|
|
7360
7427
|
if (/(right|center)/.test(position)) {
|
|
7361
7428
|
x = current.width - textRectWidth;
|
|
@@ -7379,7 +7446,7 @@ var title = {
|
|
|
7379
7446
|
yForTitle: function () {
|
|
7380
7447
|
var $$ = this;
|
|
7381
7448
|
return ($$.config.title_padding.top || 0) +
|
|
7382
|
-
$$.getTextRect($$.$el.title,
|
|
7449
|
+
$$.getTextRect($$.$el.title, $TEXT.title).height;
|
|
7383
7450
|
},
|
|
7384
7451
|
/**
|
|
7385
7452
|
* Get title padding
|
|
@@ -7404,7 +7471,7 @@ var tooltip$1 = {
|
|
|
7404
7471
|
if ($el.tooltip.empty()) {
|
|
7405
7472
|
$el.tooltip = $el.chart
|
|
7406
7473
|
.append("div")
|
|
7407
|
-
.attr("class",
|
|
7474
|
+
.attr("class", $TOOLTIP.tooltipContainer)
|
|
7408
7475
|
.style("position", "absolute")
|
|
7409
7476
|
.style("pointer-events", "none")
|
|
7410
7477
|
.style("display", "none");
|
|
@@ -7527,12 +7594,12 @@ var tooltip$1 = {
|
|
|
7527
7594
|
var title = (state.hasAxis || state.hasRadar) &&
|
|
7528
7595
|
sanitise(titleFormat ? titleFormat(row.x) : row.x);
|
|
7529
7596
|
text = tplProcess(tpl[0], {
|
|
7530
|
-
CLASS_TOOLTIP:
|
|
7597
|
+
CLASS_TOOLTIP: $TOOLTIP.tooltip,
|
|
7531
7598
|
TITLE: isValue(title) ? (tplStr ? title : "<tr><th colspan=\"2\">".concat(title, "</th></tr>")) : ""
|
|
7532
7599
|
});
|
|
7533
7600
|
}
|
|
7534
7601
|
if (!row.ratio && $$.$el.arcs) {
|
|
7535
|
-
row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path.".concat(
|
|
7602
|
+
row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path.".concat($ARC.arc, "-").concat(row.id)).data()[0]);
|
|
7536
7603
|
}
|
|
7537
7604
|
param = [row.ratio, row.id, row.index, d];
|
|
7538
7605
|
value = sanitise(valueFormat.apply(void 0, __spreadArray([getRowValue(row)], param, false)));
|
|
@@ -7556,7 +7623,7 @@ var tooltip$1 = {
|
|
|
7556
7623
|
var name_1 = sanitise(nameFormat.apply(void 0, __spreadArray([row.name], param, false)));
|
|
7557
7624
|
var color_1 = getBgColor(row);
|
|
7558
7625
|
var contentValue_1 = {
|
|
7559
|
-
CLASS_TOOLTIP_NAME:
|
|
7626
|
+
CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
|
|
7560
7627
|
COLOR: (tplStr || !$$.patterns) ? color_1 : "<svg><rect style=\"fill:".concat(color_1, "\" width=\"10\" height=\"10\"></rect></svg>"),
|
|
7561
7628
|
NAME: name_1,
|
|
7562
7629
|
VALUE: value
|
|
@@ -7833,19 +7900,19 @@ var transform = {
|
|
|
7833
7900
|
var main = $$.$el.main, $T = $$.$T;
|
|
7834
7901
|
var xAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisX) ?
|
|
7835
7902
|
transitions.axisX :
|
|
7836
|
-
$T(main.select(".".concat(
|
|
7903
|
+
$T(main.select(".".concat($AXIS.axisX)), withTransition);
|
|
7837
7904
|
var yAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY) ?
|
|
7838
7905
|
transitions.axisY :
|
|
7839
|
-
$T(main.select(".".concat(
|
|
7906
|
+
$T(main.select(".".concat($AXIS.axisY)), withTransition);
|
|
7840
7907
|
var y2Axis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY2) ?
|
|
7841
7908
|
transitions.axisY2 :
|
|
7842
|
-
$T(main.select(".".concat(
|
|
7909
|
+
$T(main.select(".".concat($AXIS.axisY2)), withTransition);
|
|
7843
7910
|
$T(main, withTransition)
|
|
7844
7911
|
.attr("transform", $$.getTranslate("main"));
|
|
7845
7912
|
xAxis.attr("transform", $$.getTranslate("x"));
|
|
7846
7913
|
yAxis.attr("transform", $$.getTranslate("y"));
|
|
7847
7914
|
y2Axis.attr("transform", $$.getTranslate("y2"));
|
|
7848
|
-
main.select(".".concat(
|
|
7915
|
+
main.select(".".concat($ARC.chartArcs))
|
|
7849
7916
|
.attr("transform", $$.getTranslate("arc"));
|
|
7850
7917
|
},
|
|
7851
7918
|
transformAll: function (withTransition, transitions) {
|
|
@@ -8250,7 +8317,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8250
8317
|
var _a = $$, config = _a.config, format = _a.format, state = _a.state;
|
|
8251
8318
|
var isRotated = config.axis_rotated;
|
|
8252
8319
|
// datetime to be used for uniqueness
|
|
8253
|
-
state.datetimeId = "bb-".concat(+new Date());
|
|
8320
|
+
state.datetimeId = "bb-".concat(+new Date() * getRandom());
|
|
8254
8321
|
$$.color = $$.generateColor();
|
|
8255
8322
|
$$.levelColor = $$.generateLevelColor();
|
|
8256
8323
|
if ($$.hasPointType()) {
|
|
@@ -8364,7 +8431,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8364
8431
|
$$.bindResize();
|
|
8365
8432
|
// Define regions
|
|
8366
8433
|
var main = $el.svg.append("g")
|
|
8367
|
-
.classed(
|
|
8434
|
+
.classed($COMMON.main, true)
|
|
8368
8435
|
.attr("transform", $$.getTranslate("main"));
|
|
8369
8436
|
$el.main = main;
|
|
8370
8437
|
// initialize subchart when subchart show option is set
|
|
@@ -8376,7 +8443,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8376
8443
|
// text when empty
|
|
8377
8444
|
if (config.data_empty_label_text) {
|
|
8378
8445
|
main.append("text")
|
|
8379
|
-
.attr("class", "".concat(
|
|
8446
|
+
.attr("class", "".concat($TEXT.text, " ").concat($COMMON.empty))
|
|
8380
8447
|
.attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
|
|
8381
8448
|
.attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
|
|
8382
8449
|
}
|
|
@@ -8387,7 +8454,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8387
8454
|
!config.clipPath && $$.axis.init();
|
|
8388
8455
|
}
|
|
8389
8456
|
// Define g for chart area
|
|
8390
|
-
main.append("g").attr("class",
|
|
8457
|
+
main.append("g").attr("class", $COMMON.chart)
|
|
8391
8458
|
.attr("clip-path", state.clip.path);
|
|
8392
8459
|
$$.callPluginHook("$init");
|
|
8393
8460
|
if (hasAxis) {
|
|
@@ -8546,7 +8613,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8546
8613
|
ChartInternal.prototype.showTargets = function () {
|
|
8547
8614
|
var $$ = this;
|
|
8548
8615
|
var svg = $$.$el.svg, $T = $$.$T;
|
|
8549
|
-
$T(svg.selectAll(".".concat(
|
|
8616
|
+
$T(svg.selectAll(".".concat($COMMON.target))
|
|
8550
8617
|
.filter(function (d) { return $$.isTargetToShow(d.id); })).style("opacity", null);
|
|
8551
8618
|
};
|
|
8552
8619
|
ChartInternal.prototype.getWithOption = function (options) {
|
|
@@ -8709,7 +8776,7 @@ var apiChart = {
|
|
|
8709
8776
|
config.size_width = size ? size.width : null;
|
|
8710
8777
|
config.size_height = size ? size.height : null;
|
|
8711
8778
|
state.resizing = true;
|
|
8712
|
-
this.flush(false
|
|
8779
|
+
this.flush(false);
|
|
8713
8780
|
$$.resizeFunction();
|
|
8714
8781
|
}
|
|
8715
8782
|
},
|
|
@@ -9176,11 +9243,11 @@ var apiFocus = {
|
|
|
9176
9243
|
var candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
|
|
9177
9244
|
this.revert();
|
|
9178
9245
|
this.defocus();
|
|
9179
|
-
candidates.classed(
|
|
9246
|
+
candidates.classed($FOCUS.focused, true).classed($FOCUS.defocused, false);
|
|
9180
9247
|
if ($$.hasArcType() && !state.hasRadar) {
|
|
9181
9248
|
$$.expandArc(targetIds);
|
|
9182
9249
|
$$.hasType("gauge") &&
|
|
9183
|
-
$$.markOverlapped(targetIdsValue, $$, ".".concat(
|
|
9250
|
+
$$.markOverlapped(targetIdsValue, $$, ".".concat($GAUGE.gaugeValue));
|
|
9184
9251
|
}
|
|
9185
9252
|
$$.toggleFocusLegend(targetIds, true);
|
|
9186
9253
|
state.focusedTargetIds = targetIds;
|
|
@@ -9208,11 +9275,11 @@ var apiFocus = {
|
|
|
9208
9275
|
var state = $$.state;
|
|
9209
9276
|
var targetIds = $$.mapToTargetIds(targetIdsValue);
|
|
9210
9277
|
var candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
|
|
9211
|
-
candidates.classed(
|
|
9278
|
+
candidates.classed($FOCUS.focused, false).classed($FOCUS.defocused, true);
|
|
9212
9279
|
if ($$.hasArcType()) {
|
|
9213
9280
|
$$.unexpandArc(targetIds);
|
|
9214
9281
|
$$.hasType("gauge") &&
|
|
9215
|
-
$$.undoMarkOverlapped($$, ".".concat(
|
|
9282
|
+
$$.undoMarkOverlapped($$, ".".concat($GAUGE.gaugeValue));
|
|
9216
9283
|
}
|
|
9217
9284
|
$$.toggleFocusLegend(targetIds, false);
|
|
9218
9285
|
state.focusedTargetIds = state.focusedTargetIds.filter(function (id) { return targetIds.indexOf(id) < 0; });
|
|
@@ -9240,15 +9307,15 @@ var apiFocus = {
|
|
|
9240
9307
|
var config = $$.config, state = $$.state, $el = $$.$el;
|
|
9241
9308
|
var targetIds = $$.mapToTargetIds(targetIdsValue);
|
|
9242
9309
|
var candidates = $el.svg.selectAll($$.selectorTargets(targetIds)); // should be for all targets
|
|
9243
|
-
candidates.classed(
|
|
9310
|
+
candidates.classed($FOCUS.focused, false).classed($FOCUS.defocused, false);
|
|
9244
9311
|
$$.hasArcType() && $$.unexpandArc(targetIds);
|
|
9245
9312
|
if (config.legend_show) {
|
|
9246
9313
|
$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
|
|
9247
9314
|
$el.legend.selectAll($$.selectorLegends(targetIds))
|
|
9248
9315
|
.filter(function () {
|
|
9249
|
-
return select(this).classed(
|
|
9316
|
+
return select(this).classed($FOCUS.legendItemFocused);
|
|
9250
9317
|
})
|
|
9251
|
-
.classed(
|
|
9318
|
+
.classed($FOCUS.legendItemFocused, false);
|
|
9252
9319
|
}
|
|
9253
9320
|
state.focusedTargetIds = [];
|
|
9254
9321
|
state.defocusedTargetIds = [];
|
|
@@ -10386,8 +10453,8 @@ extend(regions, {
|
|
|
10386
10453
|
var $$ = this.internal;
|
|
10387
10454
|
var config = $$.config, $T = $$.$T;
|
|
10388
10455
|
var options = optionsValue || {};
|
|
10389
|
-
var classes = getOption(options, "classes", [
|
|
10390
|
-
var regions = $$.$el.main.select(".".concat(
|
|
10456
|
+
var classes = getOption(options, "classes", [$REGION.region]);
|
|
10457
|
+
var regions = $$.$el.main.select(".".concat($REGION.regions))
|
|
10391
10458
|
.selectAll(classes.map(function (c) { return ".".concat(c); }));
|
|
10392
10459
|
$T(regions)
|
|
10393
10460
|
.style("opacity", "0")
|
|
@@ -11261,7 +11328,7 @@ var Axis = /** @class */ (function () {
|
|
|
11261
11328
|
this.setOrient();
|
|
11262
11329
|
}
|
|
11263
11330
|
Axis.prototype.getAxisClassName = function (id) {
|
|
11264
|
-
return "".concat(
|
|
11331
|
+
return "".concat($AXIS.axis, " ").concat($AXIS["axis".concat(capitalize(id))]);
|
|
11265
11332
|
};
|
|
11266
11333
|
Axis.prototype.isHorizontal = function ($$, forHorizontal) {
|
|
11267
11334
|
var isRotated = $$.config.axis_rotated;
|
|
@@ -11306,7 +11373,7 @@ var Axis = /** @class */ (function () {
|
|
|
11306
11373
|
config.axis_y2_show && target.push("y2");
|
|
11307
11374
|
target.forEach(function (v) {
|
|
11308
11375
|
var classAxis = _this.getAxisClassName(v);
|
|
11309
|
-
var classLabel =
|
|
11376
|
+
var classLabel = $AXIS["axis".concat(v.toUpperCase(), "Label")];
|
|
11310
11377
|
axis[v] = main.append("g")
|
|
11311
11378
|
.attr("class", classAxis)
|
|
11312
11379
|
.attr("clip-path", function () {
|
|
@@ -11385,7 +11452,7 @@ var Axis = /** @class */ (function () {
|
|
|
11385
11452
|
Axis.prototype.updateAxes = function () {
|
|
11386
11453
|
var _this = this;
|
|
11387
11454
|
var $$ = this.owner;
|
|
11388
|
-
var config = $$.config, main = $$.$el.main;
|
|
11455
|
+
var config = $$.config, main = $$.$el.main, $T = $$.$T;
|
|
11389
11456
|
Object.keys(this.axesList).forEach(function (id) {
|
|
11390
11457
|
var axesConfig = config["axis_".concat(id, "_axes")];
|
|
11391
11458
|
var scale = $$.scale[id].copy();
|
|
@@ -11407,7 +11474,7 @@ var Axis = /** @class */ (function () {
|
|
|
11407
11474
|
}
|
|
11408
11475
|
else {
|
|
11409
11476
|
axesConfig[i].domain && scale.domain(axesConfig[i].domain);
|
|
11410
|
-
|
|
11477
|
+
$T(g).call(v.scale(scale));
|
|
11411
11478
|
}
|
|
11412
11479
|
g.attr("transform", $$.getTranslate(id, i + 1));
|
|
11413
11480
|
});
|
|
@@ -11811,9 +11878,9 @@ var Axis = /** @class */ (function () {
|
|
|
11811
11878
|
var $$ = this.owner;
|
|
11812
11879
|
var main = $$.$el.main, $T = $$.$T;
|
|
11813
11880
|
var labels = {
|
|
11814
|
-
x: main.select(".".concat(
|
|
11815
|
-
y: main.select(".".concat(
|
|
11816
|
-
y2: main.select(".".concat(
|
|
11881
|
+
x: main.select(".".concat($AXIS.axisX, " .").concat($AXIS.axisXLabel)),
|
|
11882
|
+
y: main.select(".".concat($AXIS.axisY, " .").concat($AXIS.axisYLabel)),
|
|
11883
|
+
y2: main.select(".".concat($AXIS.axisY2, " .").concat($AXIS.axisY2Label))
|
|
11817
11884
|
};
|
|
11818
11885
|
Object.keys(labels).filter(function (id) { return !labels[id].empty(); })
|
|
11819
11886
|
.forEach(function (v) {
|
|
@@ -11933,10 +12000,11 @@ var Axis = /** @class */ (function () {
|
|
|
11933
12000
|
xDomainForZoom = scale.x.orgDomain();
|
|
11934
12001
|
}
|
|
11935
12002
|
["y", "y2"].forEach(function (key) {
|
|
12003
|
+
var prefix = "axis_".concat(key, "_");
|
|
11936
12004
|
var axisScale = scale[key];
|
|
11937
|
-
if (axisScale) {
|
|
11938
|
-
var tickValues = config["
|
|
11939
|
-
var tickCount = config["
|
|
12005
|
+
if (config["".concat(prefix, "show")] && axisScale) {
|
|
12006
|
+
var tickValues = config["".concat(prefix, "tick_values")];
|
|
12007
|
+
var tickCount = config["".concat(prefix, "tick_count")];
|
|
11940
12008
|
axisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));
|
|
11941
12009
|
if (!tickValues && tickCount) {
|
|
11942
12010
|
var axis = $$.axis[key];
|
|
@@ -11988,8 +12056,8 @@ var Axis = /** @class */ (function () {
|
|
|
11988
12056
|
}
|
|
11989
12057
|
tickNodes.each(function (d) {
|
|
11990
12058
|
if (tickValues_1.indexOf(d) % intervalForCulling_1) {
|
|
11991
|
-
(lines_1 ? this.querySelector("text") : this)
|
|
11992
|
-
|
|
12059
|
+
var node = (lines_1 ? this.querySelector("text") : this);
|
|
12060
|
+
node && (node.style.display = "none");
|
|
11993
12061
|
}
|
|
11994
12062
|
});
|
|
11995
12063
|
}
|
|
@@ -11999,7 +12067,7 @@ var Axis = /** @class */ (function () {
|
|
|
11999
12067
|
// set/unset x_axis_tick_clippath
|
|
12000
12068
|
if (type === "x") {
|
|
12001
12069
|
var clipPath = current.maxTickWidths.x.clipPath ? clip.pathXAxisTickTexts : null;
|
|
12002
|
-
$el.svg.selectAll(".".concat(
|
|
12070
|
+
$el.svg.selectAll(".".concat($AXIS.axisX, " .tick text"))
|
|
12003
12071
|
.attr("clip-path", clipPath);
|
|
12004
12072
|
}
|
|
12005
12073
|
}
|
|
@@ -12020,9 +12088,9 @@ var eventrect = {
|
|
|
12020
12088
|
*/
|
|
12021
12089
|
initEventRect: function () {
|
|
12022
12090
|
var $$ = this;
|
|
12023
|
-
$$.$el.main.select(".".concat(
|
|
12091
|
+
$$.$el.main.select(".".concat($COMMON.chart))
|
|
12024
12092
|
.append("g")
|
|
12025
|
-
.attr("class",
|
|
12093
|
+
.attr("class", $EVENT.eventRects)
|
|
12026
12094
|
.style("fill-opacity", "0");
|
|
12027
12095
|
},
|
|
12028
12096
|
/**
|
|
@@ -12038,12 +12106,12 @@ var eventrect = {
|
|
|
12038
12106
|
$$.updateEventRect($el.eventRect, true);
|
|
12039
12107
|
}
|
|
12040
12108
|
else {
|
|
12041
|
-
var eventRects = $$.$el.main.select(".".concat(
|
|
12109
|
+
var eventRects = $$.$el.main.select(".".concat($EVENT.eventRects))
|
|
12042
12110
|
.style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? (config.axis_rotated ? "ns-resize" : "ew-resize") : null)
|
|
12043
|
-
.classed(
|
|
12044
|
-
.classed(
|
|
12111
|
+
.classed($EVENT.eventRectsMultiple, isMultipleX)
|
|
12112
|
+
.classed($EVENT.eventRectsSingle, !isMultipleX);
|
|
12045
12113
|
// append event <rect>
|
|
12046
|
-
var eventRectUpdate = eventRects.selectAll(".".concat(
|
|
12114
|
+
var eventRectUpdate = eventRects.selectAll(".".concat($EVENT.eventRect))
|
|
12047
12115
|
.data([0])
|
|
12048
12116
|
.enter()
|
|
12049
12117
|
.append("rect");
|
|
@@ -12124,7 +12192,7 @@ var eventrect = {
|
|
|
12124
12192
|
})
|
|
12125
12193
|
.on("touchstart.eventRect touchmove.eventRect", function (event) {
|
|
12126
12194
|
state.event = event;
|
|
12127
|
-
if (!eventRect.empty() && eventRect.classed(
|
|
12195
|
+
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
12128
12196
|
// if touch points are > 1, means doing zooming interaction. In this case do not execute tooltip codes.
|
|
12129
12197
|
if (state.dragging || state.flowing || $$.hasArcType() || event.touches.length > 1) {
|
|
12130
12198
|
return;
|
|
@@ -12138,7 +12206,7 @@ var eventrect = {
|
|
|
12138
12206
|
}, true)
|
|
12139
12207
|
.on("touchend.eventRect", function (event) {
|
|
12140
12208
|
state.event = event;
|
|
12141
|
-
if (!eventRect.empty() && eventRect.classed(
|
|
12209
|
+
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
12142
12210
|
if ($$.hasArcType() || !$$.toggleShape || state.cancelClick) {
|
|
12143
12211
|
state.cancelClick && (state.cancelClick = false);
|
|
12144
12212
|
}
|
|
@@ -12175,7 +12243,7 @@ var eventrect = {
|
|
|
12175
12243
|
.attr("height", height);
|
|
12176
12244
|
// only for init
|
|
12177
12245
|
if (!rendered) {
|
|
12178
|
-
rectElement.attr("class",
|
|
12246
|
+
rectElement.attr("class", $EVENT.eventRect);
|
|
12179
12247
|
}
|
|
12180
12248
|
}
|
|
12181
12249
|
updateClientRect();
|
|
@@ -12287,7 +12355,7 @@ var eventrect = {
|
|
|
12287
12355
|
$$.showGridFocus(selectedData);
|
|
12288
12356
|
// Show cursor as pointer if point is close to mouse position
|
|
12289
12357
|
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
|
|
12290
|
-
$$.$el.svg.select(".".concat(
|
|
12358
|
+
$$.$el.svg.select(".".concat($EVENT.eventRect)).style("cursor", "pointer");
|
|
12291
12359
|
if (!state.mouseover) {
|
|
12292
12360
|
config.data_onover.call($$.api, closest);
|
|
12293
12361
|
state.mouseover = closest;
|
|
@@ -12301,7 +12369,7 @@ var eventrect = {
|
|
|
12301
12369
|
unselectRect: function () {
|
|
12302
12370
|
var $$ = this;
|
|
12303
12371
|
var config = $$.config, _a = $$.$el, circle = _a.circle, tooltip = _a.tooltip;
|
|
12304
|
-
$$.$el.svg.select(".".concat(
|
|
12372
|
+
$$.$el.svg.select(".".concat($EVENT.eventRect)).style("cursor", null);
|
|
12305
12373
|
$$.hideGridFocus();
|
|
12306
12374
|
if (tooltip) {
|
|
12307
12375
|
$$.hideTooltip();
|
|
@@ -12313,8 +12381,8 @@ var eventrect = {
|
|
|
12313
12381
|
/**
|
|
12314
12382
|
* Create eventRect for each data on the x-axis.
|
|
12315
12383
|
* Register touch and drag events.
|
|
12316
|
-
* @param {object} eventRectEnter d3.select(
|
|
12317
|
-
* @returns {object} d3.select(
|
|
12384
|
+
* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
|
|
12385
|
+
* @returns {object} d3.select($EVENT.eventRects) object.
|
|
12318
12386
|
* @private
|
|
12319
12387
|
*/
|
|
12320
12388
|
generateEventRectsForSingleX: function (eventRectEnter) {
|
|
@@ -12397,7 +12465,7 @@ var eventrect = {
|
|
|
12397
12465
|
return;
|
|
12398
12466
|
}
|
|
12399
12467
|
var index = d.index;
|
|
12400
|
-
main.selectAll(".".concat(
|
|
12468
|
+
main.selectAll(".".concat($SHAPE.shape, "-").concat(index))
|
|
12401
12469
|
.each(function (d2) {
|
|
12402
12470
|
var _a;
|
|
12403
12471
|
if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
|
|
@@ -12409,7 +12477,7 @@ var eventrect = {
|
|
|
12409
12477
|
/**
|
|
12410
12478
|
* Create an eventRect,
|
|
12411
12479
|
* Register touch and drag events.
|
|
12412
|
-
* @param {object} eventRectEnter d3.select(
|
|
12480
|
+
* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
|
|
12413
12481
|
* @private
|
|
12414
12482
|
*/
|
|
12415
12483
|
generateEventRectsForMultipleXs: function (eventRectEnter) {
|
|
@@ -12450,8 +12518,8 @@ var eventrect = {
|
|
|
12450
12518
|
}
|
|
12451
12519
|
// select if selection enabled
|
|
12452
12520
|
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
|
|
12453
|
-
$$.$el.main.selectAll(".".concat(
|
|
12454
|
-
.selectAll(".".concat(
|
|
12521
|
+
$$.$el.main.selectAll(".".concat($SHAPE.shapes).concat($$.getTargetSelectorSuffix(closest.id)))
|
|
12522
|
+
.selectAll(".".concat($SHAPE.shape, "-").concat(closest.index))
|
|
12455
12523
|
.each(function () {
|
|
12456
12524
|
var _a;
|
|
12457
12525
|
if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
|
|
@@ -12846,11 +12914,11 @@ var grid = {
|
|
|
12846
12914
|
var $$ = this;
|
|
12847
12915
|
var config = $$.config, clip = $$.state.clip, $el = $$.$el;
|
|
12848
12916
|
if (config.grid_x_lines.length || config.grid_y_lines.length) {
|
|
12849
|
-
$el.gridLines.main = $el.main.insert("g", ".".concat(
|
|
12917
|
+
$el.gridLines.main = $el.main.insert("g", ".".concat($COMMON.chart).concat(config.grid_lines_front ? " + *" : ""))
|
|
12850
12918
|
.attr("clip-path", clip.pathGrid)
|
|
12851
|
-
.attr("class", "".concat(
|
|
12852
|
-
$el.gridLines.main.append("g").attr("class",
|
|
12853
|
-
$el.gridLines.main.append("g").attr("class",
|
|
12919
|
+
.attr("class", "".concat($GRID.grid, " ").concat($GRID.gridLines));
|
|
12920
|
+
$el.gridLines.main.append("g").attr("class", $GRID.xgridLines);
|
|
12921
|
+
$el.gridLines.main.append("g").attr("class", $GRID.ygridLines);
|
|
12854
12922
|
$el.gridLines.x = selectAll([]);
|
|
12855
12923
|
}
|
|
12856
12924
|
},
|
|
@@ -12872,13 +12940,13 @@ var grid = {
|
|
|
12872
12940
|
"y1": 0,
|
|
12873
12941
|
"y2": state.height
|
|
12874
12942
|
};
|
|
12875
|
-
grid.x = main.select(".".concat(
|
|
12876
|
-
.selectAll(".".concat(
|
|
12943
|
+
grid.x = main.select(".".concat($GRID.xgrids))
|
|
12944
|
+
.selectAll(".".concat($GRID.xgrid))
|
|
12877
12945
|
.data(xgridData);
|
|
12878
12946
|
grid.x.exit().remove();
|
|
12879
12947
|
grid.x = grid.x.enter()
|
|
12880
12948
|
.append("line")
|
|
12881
|
-
.attr("class",
|
|
12949
|
+
.attr("class", $GRID.xgrid)
|
|
12882
12950
|
.merge(grid.x);
|
|
12883
12951
|
if (!withoutUpdate) {
|
|
12884
12952
|
grid.x.each(function () {
|
|
@@ -12897,14 +12965,14 @@ var grid = {
|
|
|
12897
12965
|
var isRotated = config.axis_rotated;
|
|
12898
12966
|
var gridValues = $$.axis.y.tickValues() || $$.scale.y.ticks(config.grid_y_ticks);
|
|
12899
12967
|
var pos = function (d) { return Math.ceil($$.scale.y(d)); };
|
|
12900
|
-
grid.y = main.select(".".concat(
|
|
12901
|
-
.selectAll(".".concat(
|
|
12968
|
+
grid.y = main.select(".".concat($GRID.ygrids))
|
|
12969
|
+
.selectAll(".".concat($GRID.ygrid))
|
|
12902
12970
|
.data(gridValues);
|
|
12903
12971
|
grid.y.exit().remove();
|
|
12904
12972
|
grid.y = grid.y
|
|
12905
12973
|
.enter()
|
|
12906
12974
|
.append("line")
|
|
12907
|
-
.attr("class",
|
|
12975
|
+
.attr("class", $GRID.ygrid)
|
|
12908
12976
|
.merge(grid.y);
|
|
12909
12977
|
grid.y.attr("x1", isRotated ? pos : 0)
|
|
12910
12978
|
.attr("x2", isRotated ? pos : state.width)
|
|
@@ -12931,8 +12999,8 @@ var grid = {
|
|
|
12931
12999
|
var config = $$.config, _a = $$.$el, gridLines = _a.gridLines, main = _a.main, $T = $$.$T;
|
|
12932
13000
|
var isRotated = config.axis_rotated;
|
|
12933
13001
|
config.grid_x_show && $$.updateXGrid();
|
|
12934
|
-
var xLines = main.select(".".concat(
|
|
12935
|
-
.selectAll(".".concat(
|
|
13002
|
+
var xLines = main.select(".".concat($GRID.xgridLines))
|
|
13003
|
+
.selectAll(".".concat($GRID.xgridLine))
|
|
12936
13004
|
.data(config.grid_x_lines);
|
|
12937
13005
|
// exit
|
|
12938
13006
|
$T(xLines.exit())
|
|
@@ -12948,7 +13016,7 @@ var grid = {
|
|
|
12948
13016
|
.style("opacity", "0");
|
|
12949
13017
|
xLines = xgridLine.merge(xLines);
|
|
12950
13018
|
$T(xLines
|
|
12951
|
-
.attr("class", function (d) { return "".concat(
|
|
13019
|
+
.attr("class", function (d) { return "".concat($GRID.xgridLine, " ").concat(d["class"] || "").trim(); })
|
|
12952
13020
|
.select("text")
|
|
12953
13021
|
.attr("text-anchor", getGridTextAnchor)
|
|
12954
13022
|
.attr("dx", getGridTextDx))
|
|
@@ -12965,8 +13033,8 @@ var grid = {
|
|
|
12965
13033
|
var config = $$.config, _a = $$.state, width = _a.width, height = _a.height, $el = $$.$el, $T = $$.$T;
|
|
12966
13034
|
var isRotated = config.axis_rotated;
|
|
12967
13035
|
config.grid_y_show && $$.updateYGrid();
|
|
12968
|
-
var ygridLines = $el.main.select(".".concat(
|
|
12969
|
-
.selectAll(".".concat(
|
|
13036
|
+
var ygridLines = $el.main.select(".".concat($GRID.ygridLines))
|
|
13037
|
+
.selectAll(".".concat($GRID.ygridLine))
|
|
12970
13038
|
.data(config.grid_y_lines);
|
|
12971
13039
|
// exit
|
|
12972
13040
|
$T(ygridLines.exit())
|
|
@@ -12983,7 +13051,7 @@ var grid = {
|
|
|
12983
13051
|
// update
|
|
12984
13052
|
var yv = $$.yv.bind($$);
|
|
12985
13053
|
$T(ygridLines
|
|
12986
|
-
.attr("class", function (d) { return "".concat(
|
|
13054
|
+
.attr("class", function (d) { return "".concat($GRID.ygridLine, " ").concat(d["class"] || "").trim(); })
|
|
12987
13055
|
.select("line"))
|
|
12988
13056
|
.attr("x1", isRotated ? yv : 0)
|
|
12989
13057
|
.attr("x2", isRotated ? yv : width)
|
|
@@ -13024,26 +13092,26 @@ var grid = {
|
|
|
13024
13092
|
var $$ = this;
|
|
13025
13093
|
var config = $$.config, clip = $$.state.clip, $el = $$.$el;
|
|
13026
13094
|
var isFront = config.grid_front;
|
|
13027
|
-
var className = ".".concat(
|
|
13095
|
+
var className = ".".concat(isFront && $el.gridLines.main ? $GRID.gridLines : $COMMON.chart).concat(isFront ? " + *" : "");
|
|
13028
13096
|
var grid = $el.main.insert("g", className)
|
|
13029
13097
|
.attr("clip-path", clip.pathGrid)
|
|
13030
|
-
.attr("class",
|
|
13098
|
+
.attr("class", $GRID.grid);
|
|
13031
13099
|
$el.grid.main = grid;
|
|
13032
13100
|
config.grid_x_show &&
|
|
13033
|
-
grid.append("g").attr("class",
|
|
13101
|
+
grid.append("g").attr("class", $GRID.xgrids);
|
|
13034
13102
|
config.grid_y_show &&
|
|
13035
|
-
grid.append("g").attr("class",
|
|
13103
|
+
grid.append("g").attr("class", $GRID.ygrids);
|
|
13036
13104
|
if (config.interaction_enabled && config.grid_focus_show) {
|
|
13037
13105
|
grid.append("g")
|
|
13038
|
-
.attr("class",
|
|
13106
|
+
.attr("class", $FOCUS.xgridFocus)
|
|
13039
13107
|
.append("line")
|
|
13040
|
-
.attr("class",
|
|
13108
|
+
.attr("class", $FOCUS.xgridFocus);
|
|
13041
13109
|
// to show xy focus grid line, should be 'tooltip.grouped=false'
|
|
13042
13110
|
if (config.grid_focus_y && !config.tooltip_grouped) {
|
|
13043
13111
|
grid.append("g")
|
|
13044
|
-
.attr("class",
|
|
13112
|
+
.attr("class", $FOCUS.ygridFocus)
|
|
13045
13113
|
.append("line")
|
|
13046
|
-
.attr("class",
|
|
13114
|
+
.attr("class", $FOCUS.ygridFocus);
|
|
13047
13115
|
}
|
|
13048
13116
|
}
|
|
13049
13117
|
},
|
|
@@ -13057,7 +13125,7 @@ var grid = {
|
|
|
13057
13125
|
var $$ = this;
|
|
13058
13126
|
var config = $$.config, _b = $$.state, width = _b.width, height = _b.height;
|
|
13059
13127
|
var isRotated = config.axis_rotated;
|
|
13060
|
-
var focusEl = $$.$el.main.selectAll("line.".concat(
|
|
13128
|
+
var focusEl = $$.$el.main.selectAll("line.".concat($FOCUS.xgridFocus, ", line.").concat($FOCUS.ygridFocus));
|
|
13061
13129
|
var dataToShow = (data || [focusEl.datum()]).filter(function (d) { return d && isValue($$.getBaseValue(d)); });
|
|
13062
13130
|
// Hide when bubble/scatter/stanford plot exists
|
|
13063
13131
|
if (!config.tooltip_show || dataToShow.length === 0 || $$.hasType("bubble") || $$.hasArcType()) {
|
|
@@ -13075,7 +13143,7 @@ var grid = {
|
|
|
13075
13143
|
y: $$.getYScaleById(d.id)(d.value)
|
|
13076
13144
|
};
|
|
13077
13145
|
var xy;
|
|
13078
|
-
if (el.classed(
|
|
13146
|
+
if (el.classed($FOCUS.xgridFocus)) {
|
|
13079
13147
|
// will contain 'x1, y1, x2, y2' order
|
|
13080
13148
|
xy = isRotated ?
|
|
13081
13149
|
[
|
|
@@ -13116,7 +13184,7 @@ var grid = {
|
|
|
13116
13184
|
var $$ = this;
|
|
13117
13185
|
var _b = $$.state, inputType = _b.inputType, resizing = _b.resizing, main = $$.$el.main;
|
|
13118
13186
|
if (inputType === "mouse" || !resizing) {
|
|
13119
|
-
main.selectAll("line.".concat(
|
|
13187
|
+
main.selectAll("line.".concat($FOCUS.xgridFocus, ", line.").concat($FOCUS.ygridFocus))
|
|
13120
13188
|
.style("visibility", "hidden");
|
|
13121
13189
|
(_a = $$.hideCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$);
|
|
13122
13190
|
}
|
|
@@ -13125,7 +13193,7 @@ var grid = {
|
|
|
13125
13193
|
var _a;
|
|
13126
13194
|
var $$ = this;
|
|
13127
13195
|
var _b = $$.state, inputType = _b.inputType, width = _b.width, height = _b.height, resizing = _b.resizing, grid = $$.$el.grid;
|
|
13128
|
-
var xgridFocus = grid.main.select("line.".concat(
|
|
13196
|
+
var xgridFocus = grid.main.select("line.".concat($FOCUS.xgridFocus));
|
|
13129
13197
|
if (inputType === "touch") {
|
|
13130
13198
|
if (xgridFocus.empty()) {
|
|
13131
13199
|
resizing && ((_a = $$.showCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$));
|
|
@@ -13148,7 +13216,7 @@ var grid = {
|
|
|
13148
13216
|
},
|
|
13149
13217
|
generateGridData: function (type, scale) {
|
|
13150
13218
|
var $$ = this;
|
|
13151
|
-
var tickNum = $$.$el.main.select(".".concat(
|
|
13219
|
+
var tickNum = $$.$el.main.select(".".concat($AXIS.axisX))
|
|
13152
13220
|
.selectAll(".tick")
|
|
13153
13221
|
.size();
|
|
13154
13222
|
var gridData = [];
|
|
@@ -13183,8 +13251,8 @@ var grid = {
|
|
|
13183
13251
|
var config = $$.config, $T = $$.$T;
|
|
13184
13252
|
var toRemove = $$.getGridFilterToRemove(params);
|
|
13185
13253
|
var toShow = function (line) { return !toRemove(line); };
|
|
13186
|
-
var classLines = forX ?
|
|
13187
|
-
var classLine = forX ?
|
|
13254
|
+
var classLines = forX ? $GRID.xgridLines : $GRID.ygridLines;
|
|
13255
|
+
var classLine = forX ? $GRID.xgridLine : $GRID.ygridLine;
|
|
13188
13256
|
$T($$.$el.main.select(".".concat(classLines))
|
|
13189
13257
|
.selectAll(".".concat(classLine))
|
|
13190
13258
|
.filter(toRemove))
|
|
@@ -13206,7 +13274,7 @@ var region = {
|
|
|
13206
13274
|
$el.region.main = $el.main
|
|
13207
13275
|
.insert("g", ":first-child")
|
|
13208
13276
|
.attr("clip-path", $$.state.clip.path)
|
|
13209
|
-
.attr("class",
|
|
13277
|
+
.attr("class", $REGION.regions);
|
|
13210
13278
|
},
|
|
13211
13279
|
updateRegion: function () {
|
|
13212
13280
|
var $$ = this;
|
|
@@ -13218,7 +13286,7 @@ var region = {
|
|
|
13218
13286
|
region.main.style("visibility", $$.hasArcType() ? "hidden" : null);
|
|
13219
13287
|
// select <g> element
|
|
13220
13288
|
var list = region.main
|
|
13221
|
-
.selectAll(".".concat(
|
|
13289
|
+
.selectAll(".".concat($REGION.region))
|
|
13222
13290
|
.data(config.regions);
|
|
13223
13291
|
$T(list.exit())
|
|
13224
13292
|
.style("opacity", "0")
|
|
@@ -15568,14 +15636,14 @@ var shapeArc = {
|
|
|
15568
15636
|
var interval_1 = setInterval(function () {
|
|
15569
15637
|
if (!transiting) {
|
|
15570
15638
|
clearInterval(interval_1);
|
|
15571
|
-
$el.legend.selectAll(".".concat(
|
|
15639
|
+
$el.legend.selectAll(".".concat($FOCUS.legendItemFocused)).size() > 0 &&
|
|
15572
15640
|
$$.expandArc(targetIds);
|
|
15573
15641
|
}
|
|
15574
15642
|
}, 10);
|
|
15575
15643
|
return;
|
|
15576
15644
|
}
|
|
15577
15645
|
var newTargetIds = $$.mapToTargetIds(targetIds);
|
|
15578
|
-
$el.svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(
|
|
15646
|
+
$el.svg.selectAll($$.selectorTargets(newTargetIds, ".".concat($ARC.chartArc)))
|
|
15579
15647
|
.each(function (d) {
|
|
15580
15648
|
if (!$$.shouldExpand(d.data.id)) {
|
|
15581
15649
|
return;
|
|
@@ -15598,12 +15666,12 @@ var shapeArc = {
|
|
|
15598
15666
|
return;
|
|
15599
15667
|
}
|
|
15600
15668
|
var newTargetIds = $$.mapToTargetIds(targetIds);
|
|
15601
|
-
svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(
|
|
15669
|
+
svg.selectAll($$.selectorTargets(newTargetIds, ".".concat($ARC.chartArc)))
|
|
15602
15670
|
.selectAll("path")
|
|
15603
15671
|
.transition()
|
|
15604
15672
|
.duration(function (d) { return $$.getExpandConfig(d.data.id, "duration"); })
|
|
15605
15673
|
.attr("d", $$.svgArc);
|
|
15606
|
-
svg.selectAll("".concat(
|
|
15674
|
+
svg.selectAll("".concat($ARC.arc))
|
|
15607
15675
|
.style("opacity", null);
|
|
15608
15676
|
},
|
|
15609
15677
|
/**
|
|
@@ -15669,9 +15737,9 @@ var shapeArc = {
|
|
|
15669
15737
|
var classChartArc = $$.getChartClass("Arc");
|
|
15670
15738
|
var classArcs = $$.getClass("arcs", true);
|
|
15671
15739
|
var classFocus = $$.classFocus.bind($$);
|
|
15672
|
-
var chartArcs = $el.main.select(".".concat(
|
|
15740
|
+
var chartArcs = $el.main.select(".".concat($ARC.chartArcs));
|
|
15673
15741
|
var mainPieUpdate = chartArcs
|
|
15674
|
-
.selectAll(".".concat(
|
|
15742
|
+
.selectAll(".".concat($ARC.chartArc))
|
|
15675
15743
|
.data($$.pie(targets))
|
|
15676
15744
|
.attr("class", function (d) { return classChartArc(d) + classFocus(d.data); });
|
|
15677
15745
|
var mainPieEnter = mainPieUpdate.enter().append("g")
|
|
@@ -15684,16 +15752,16 @@ var shapeArc = {
|
|
|
15684
15752
|
.style("opacity", "0")
|
|
15685
15753
|
.style("text-anchor", "middle")
|
|
15686
15754
|
.style("pointer-events", "none");
|
|
15687
|
-
$el.text = chartArcs.selectAll(".".concat(
|
|
15755
|
+
$el.text = chartArcs.selectAll(".".concat($COMMON.target, " text"));
|
|
15688
15756
|
// MEMO: can not keep same color..., but not bad to update color in redraw
|
|
15689
15757
|
// mainPieUpdate.exit().remove();
|
|
15690
15758
|
},
|
|
15691
15759
|
initArc: function () {
|
|
15692
15760
|
var $$ = this;
|
|
15693
15761
|
var $el = $$.$el;
|
|
15694
|
-
$el.arcs = $el.main.select(".".concat(
|
|
15762
|
+
$el.arcs = $el.main.select(".".concat($COMMON.chart))
|
|
15695
15763
|
.append("g")
|
|
15696
|
-
.attr("class",
|
|
15764
|
+
.attr("class", $ARC.chartArcs)
|
|
15697
15765
|
.attr("transform", $$.getTranslate("arc"));
|
|
15698
15766
|
$$.setArcTitle();
|
|
15699
15767
|
},
|
|
@@ -15707,7 +15775,7 @@ var shapeArc = {
|
|
|
15707
15775
|
var hasGauge = $$.hasType("gauge");
|
|
15708
15776
|
if (title) {
|
|
15709
15777
|
var text = $$.$el.arcs.append("text")
|
|
15710
|
-
.attr("class",
|
|
15778
|
+
.attr("class", hasGauge ? $GAUGE.chartArcsGaugeTitle : $ARC.chartArcsTitle)
|
|
15711
15779
|
.style("text-anchor", "middle");
|
|
15712
15780
|
hasGauge && text.attr("dy", "-0.3em");
|
|
15713
15781
|
setTextValue(text, title, hasGauge ? undefined : [-0.6, 1.35], true);
|
|
@@ -15718,8 +15786,8 @@ var shapeArc = {
|
|
|
15718
15786
|
var config = $$.config, state = $$.state, main = $$.$el.main;
|
|
15719
15787
|
var hasInteraction = config.interaction_enabled;
|
|
15720
15788
|
var isSelectable = hasInteraction && config.data_selection_isselectable;
|
|
15721
|
-
var mainArc = main.selectAll(".".concat(
|
|
15722
|
-
.selectAll(".".concat(
|
|
15789
|
+
var mainArc = main.selectAll(".".concat($ARC.arcs))
|
|
15790
|
+
.selectAll(".".concat($ARC.arc))
|
|
15723
15791
|
.data($$.arcData.bind($$));
|
|
15724
15792
|
mainArc.exit()
|
|
15725
15793
|
.transition()
|
|
@@ -15808,15 +15876,15 @@ var shapeArc = {
|
|
|
15808
15876
|
var isFullCircle = config.gauge_fullCircle;
|
|
15809
15877
|
var startAngle = $$.getStartAngle();
|
|
15810
15878
|
var endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1;
|
|
15811
|
-
var backgroundArc = $$.$el.arcs.select("".concat(hasMultiArcGauge ? "g" : "", ".").concat(
|
|
15879
|
+
var backgroundArc = $$.$el.arcs.select("".concat(hasMultiArcGauge ? "g" : "", ".").concat($ARC.chartArcsBackground));
|
|
15812
15880
|
if (hasMultiArcGauge) {
|
|
15813
15881
|
var index_1 = 0;
|
|
15814
15882
|
backgroundArc = backgroundArc
|
|
15815
|
-
.selectAll("path.".concat(
|
|
15883
|
+
.selectAll("path.".concat($ARC.chartArcsBackground))
|
|
15816
15884
|
.data($$.data.targets);
|
|
15817
15885
|
backgroundArc.enter()
|
|
15818
15886
|
.append("path")
|
|
15819
|
-
.attr("class", function (d, i) { return "".concat(
|
|
15887
|
+
.attr("class", function (d, i) { return "".concat($ARC.chartArcsBackground, " ").concat($ARC.chartArcsBackground, "-").concat(i); })
|
|
15820
15888
|
.merge(backgroundArc)
|
|
15821
15889
|
.style("fill", (config.gauge_background) || null)
|
|
15822
15890
|
.attr("d", function (_a) {
|
|
@@ -15940,10 +16008,10 @@ var shapeArc = {
|
|
|
15940
16008
|
var text;
|
|
15941
16009
|
// for gauge type, update text when has no title & multi data
|
|
15942
16010
|
if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
|
|
15943
|
-
text = main.selectAll(".".concat(
|
|
16011
|
+
text = main.selectAll(".".concat($ARC.chartArc))
|
|
15944
16012
|
.select("text")
|
|
15945
16013
|
.style("opacity", "0")
|
|
15946
|
-
.attr("class", function (d) { return ($$.isGaugeType(d.data) ?
|
|
16014
|
+
.attr("class", function (d) { return ($$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null); })
|
|
15947
16015
|
.call($$.textForArcLabel.bind($$))
|
|
15948
16016
|
.attr("transform", $$.transformForArcLabel.bind($$))
|
|
15949
16017
|
.style("font-size", function (d) { return ($$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ?
|
|
@@ -15953,21 +16021,21 @@ var shapeArc = {
|
|
|
15953
16021
|
.style("opacity", function (d) { return ($$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? null : "0"); });
|
|
15954
16022
|
hasMultiArcGauge && text.attr("dy", "-.1em");
|
|
15955
16023
|
}
|
|
15956
|
-
main.select(".".concat(
|
|
16024
|
+
main.select(".".concat($ARC.chartArcsTitle))
|
|
15957
16025
|
.style("opacity", $$.hasType("donut") || hasGauge ? null : "0");
|
|
15958
16026
|
if (hasGauge) {
|
|
15959
16027
|
var isFullCircle = config.gauge_fullCircle;
|
|
15960
16028
|
isFullCircle && (text === null || text === void 0 ? void 0 : text.attr("dy", "".concat(hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
|
|
15961
16029
|
if (config.gauge_label_show) {
|
|
15962
|
-
arcs.select(".".concat(
|
|
16030
|
+
arcs.select(".".concat($GAUGE.chartArcsGaugeUnit))
|
|
15963
16031
|
.attr("dy", "".concat(isFullCircle ? 1.5 : 0.75, "em"))
|
|
15964
16032
|
.text(config.gauge_units);
|
|
15965
|
-
arcs.select(".".concat(
|
|
16033
|
+
arcs.select(".".concat($GAUGE.chartArcsGaugeMin))
|
|
15966
16034
|
.attr("dx", "".concat(-1 * (state.innerRadius + ((state.radius - state.innerRadius) / (isFullCircle ? 1 : 2))), "px"))
|
|
15967
16035
|
.attr("dy", "1.2em")
|
|
15968
16036
|
.text($$.textForGaugeMinMax(config.gauge_min, false));
|
|
15969
16037
|
// show max text when isn't fullCircle
|
|
15970
|
-
!isFullCircle && arcs.select(".".concat(
|
|
16038
|
+
!isFullCircle && arcs.select(".".concat($GAUGE.chartArcsGaugeMax))
|
|
15971
16039
|
.attr("dx", "".concat(state.innerRadius + ((state.radius - state.innerRadius) / 2), "px"))
|
|
15972
16040
|
.attr("dy", "1.2em")
|
|
15973
16041
|
.text($$.textForGaugeMinMax(config.gauge_max, true));
|
|
@@ -15985,7 +16053,7 @@ var shapeArea = {
|
|
|
15985
16053
|
var $$ = this;
|
|
15986
16054
|
var config = $$.config;
|
|
15987
16055
|
mainLine
|
|
15988
|
-
.insert("g", ".".concat(
|
|
16056
|
+
.insert("g", ".".concat(config.area_front ? $CIRCLE.circles : $LINE.lines))
|
|
15989
16057
|
.attr("class", $$.getClass("areas", true));
|
|
15990
16058
|
},
|
|
15991
16059
|
updateAreaGradient: function () {
|
|
@@ -16030,8 +16098,8 @@ var shapeArea = {
|
|
|
16030
16098
|
var config = $$.config, state = $$.state, $el = $$.$el, $T = $$.$T;
|
|
16031
16099
|
var $root = isSub ? $el.subchart : $el;
|
|
16032
16100
|
config.area_linearGradient && $$.updateAreaGradient();
|
|
16033
|
-
var area = $root.main.selectAll(".".concat(
|
|
16034
|
-
.selectAll(".".concat(
|
|
16101
|
+
var area = $root.main.selectAll(".".concat($AREA.areas))
|
|
16102
|
+
.selectAll(".".concat($AREA.area))
|
|
16035
16103
|
.data($$.lineData.bind($$));
|
|
16036
16104
|
$T(area.exit(), withTransition)
|
|
16037
16105
|
.style("opacity", "0")
|
|
@@ -16152,10 +16220,10 @@ var shapeArea = {
|
|
|
16152
16220
|
var shapeBar = {
|
|
16153
16221
|
initBar: function () {
|
|
16154
16222
|
var _a = this, $el = _a.$el, config = _a.config, clip = _a.state.clip;
|
|
16155
|
-
$el.bar = $el.main.select(".".concat(
|
|
16223
|
+
$el.bar = $el.main.select(".".concat($COMMON.chart))
|
|
16156
16224
|
// should positioned at the beginning of the shape node to not overlap others
|
|
16157
16225
|
.insert("g", ":first-child")
|
|
16158
|
-
.attr("class",
|
|
16226
|
+
.attr("class", $BAR.chartBars);
|
|
16159
16227
|
// set clip-path attribute when condition meet
|
|
16160
16228
|
// https://github.com/naver/billboard.js/issues/2421
|
|
16161
16229
|
if (config.clipPath === false && (config.bar_radius || config.bar_radius_ratio)) {
|
|
@@ -16172,8 +16240,8 @@ var shapeBar = {
|
|
|
16172
16240
|
if (!$el.bar) {
|
|
16173
16241
|
$$.initBar();
|
|
16174
16242
|
}
|
|
16175
|
-
var mainBarUpdate = $$.$el.main.select(".".concat(
|
|
16176
|
-
.selectAll(".".concat(
|
|
16243
|
+
var mainBarUpdate = $$.$el.main.select(".".concat($BAR.chartBars))
|
|
16244
|
+
.selectAll(".".concat($BAR.chartBar))
|
|
16177
16245
|
.data(
|
|
16178
16246
|
// remove
|
|
16179
16247
|
targets.filter(function (v) { return v.values.some(function (d) { return (isNumber(d.value) || $$.isBarRangeType(d)); }); }))
|
|
@@ -16200,8 +16268,8 @@ var shapeBar = {
|
|
|
16200
16268
|
var $root = isSub ? $el.subchart : $el;
|
|
16201
16269
|
var classBar = $$.getClass("bar", true);
|
|
16202
16270
|
var initialOpacity = $$.initialOpacity.bind($$);
|
|
16203
|
-
var bar = $root.main.selectAll(".".concat(
|
|
16204
|
-
.selectAll(".".concat(
|
|
16271
|
+
var bar = $root.main.selectAll(".".concat($BAR.bars))
|
|
16272
|
+
.selectAll(".".concat($BAR.bar))
|
|
16205
16273
|
.data($$.labelishData.bind($$));
|
|
16206
16274
|
$T(bar.exit(), withTransition)
|
|
16207
16275
|
.style("opacity", "0")
|
|
@@ -16355,10 +16423,10 @@ var shapeBar = {
|
|
|
16355
16423
|
var shapeCandlestick = {
|
|
16356
16424
|
initCandlestick: function () {
|
|
16357
16425
|
var $el = this.$el;
|
|
16358
|
-
$el.candlestick = $el.main.select(".".concat(
|
|
16426
|
+
$el.candlestick = $el.main.select(".".concat($COMMON.chart))
|
|
16359
16427
|
// should positioned at the beginning of the shape node to not overlap others
|
|
16360
16428
|
.append("g")
|
|
16361
|
-
.attr("class",
|
|
16429
|
+
.attr("class", $CANDLESTICK.chartCandlesticks);
|
|
16362
16430
|
},
|
|
16363
16431
|
/**
|
|
16364
16432
|
* Update targets by its data
|
|
@@ -16374,8 +16442,8 @@ var shapeCandlestick = {
|
|
|
16374
16442
|
if (!$el.candlestick) {
|
|
16375
16443
|
$$.initCandlestick();
|
|
16376
16444
|
}
|
|
16377
|
-
var mainUpdate = $$.$el.main.select(".".concat(
|
|
16378
|
-
.selectAll(".".concat(
|
|
16445
|
+
var mainUpdate = $$.$el.main.select(".".concat($CANDLESTICK.chartCandlesticks))
|
|
16446
|
+
.selectAll(".".concat($CANDLESTICK.chartCandlestick))
|
|
16379
16447
|
.data(targets)
|
|
16380
16448
|
.attr("class", function (d) { return classChart(d) + classFocus(d); });
|
|
16381
16449
|
mainUpdate.enter().append("g")
|
|
@@ -16395,8 +16463,8 @@ var shapeCandlestick = {
|
|
|
16395
16463
|
var $root = isSub ? $el.subchart : $el;
|
|
16396
16464
|
var classSetter = $$.getClass("candlestick", true);
|
|
16397
16465
|
var initialOpacity = $$.initialOpacity.bind($$);
|
|
16398
|
-
var candlestick = $root.main.selectAll(".".concat(
|
|
16399
|
-
.selectAll(".".concat(
|
|
16466
|
+
var candlestick = $root.main.selectAll(".".concat($CANDLESTICK.chartCandlestick))
|
|
16467
|
+
.selectAll(".".concat($CANDLESTICK.candlestick))
|
|
16400
16468
|
.data($$.labelishData.bind($$));
|
|
16401
16469
|
$T(candlestick.exit(), withTransition)
|
|
16402
16470
|
.style("opacity", "0")
|
|
@@ -16434,7 +16502,7 @@ var shapeCandlestick = {
|
|
|
16434
16502
|
var indexX = +isRotated;
|
|
16435
16503
|
var indexY = +!indexX;
|
|
16436
16504
|
if (g.classed) {
|
|
16437
|
-
g.classed(
|
|
16505
|
+
g.classed($CANDLESTICK[isUp ? "valueUp" : "valueDown"], true);
|
|
16438
16506
|
}
|
|
16439
16507
|
var path = isRotated ?
|
|
16440
16508
|
"H".concat(points[1][1], " V").concat(points[1][0], " H").concat(points[0][1]) :
|
|
@@ -16584,12 +16652,12 @@ var shapeGauge = {
|
|
|
16584
16652
|
if ($$.hasType("gauge")) {
|
|
16585
16653
|
var hasMulti = $$.hasMultiArcGauge();
|
|
16586
16654
|
arcs.append(hasMulti ? "g" : "path")
|
|
16587
|
-
.attr("class",
|
|
16655
|
+
.attr("class", $ARC.chartArcsBackground)
|
|
16588
16656
|
.style("fill", (!hasMulti && config.gauge_background) || null);
|
|
16589
|
-
config.gauge_units && appendText(
|
|
16657
|
+
config.gauge_units && appendText($GAUGE.chartArcsGaugeUnit);
|
|
16590
16658
|
if (config.gauge_label_show) {
|
|
16591
|
-
appendText(
|
|
16592
|
-
!config.gauge_fullCircle && appendText(
|
|
16659
|
+
appendText($GAUGE.chartArcsGaugeMin);
|
|
16660
|
+
!config.gauge_fullCircle && appendText($GAUGE.chartArcsGaugeMax);
|
|
16593
16661
|
}
|
|
16594
16662
|
}
|
|
16595
16663
|
},
|
|
@@ -16609,12 +16677,12 @@ var shapeGauge = {
|
|
|
16609
16677
|
var $$ = this;
|
|
16610
16678
|
var config = $$.config, state = $$.state, $el = $$.$el;
|
|
16611
16679
|
var hiddenTargetIds = $$.state.hiddenTargetIds;
|
|
16612
|
-
var arcLabelLines = $el.main.selectAll(".".concat(
|
|
16613
|
-
.selectAll(".".concat(
|
|
16680
|
+
var arcLabelLines = $el.main.selectAll(".".concat($ARC.arcs))
|
|
16681
|
+
.selectAll(".".concat($ARC.arcLabelLine))
|
|
16614
16682
|
.data($$.arcData.bind($$));
|
|
16615
16683
|
var mainArcLabelLine = arcLabelLines.enter()
|
|
16616
16684
|
.append("rect")
|
|
16617
|
-
.attr("class", function (d) { return "".concat(
|
|
16685
|
+
.attr("class", function (d) { return "".concat($ARC.arcLabelLine, " ").concat($COMMON.target, " ").concat($COMMON.target, "-").concat(d.data.id); })
|
|
16618
16686
|
.merge(arcLabelLines);
|
|
16619
16687
|
mainArcLabelLine
|
|
16620
16688
|
.style("fill", function (d) { return ($$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data)); })
|
|
@@ -16735,8 +16803,8 @@ var shapeBubble = {
|
|
|
16735
16803
|
var shapeLine = {
|
|
16736
16804
|
initLine: function () {
|
|
16737
16805
|
var $el = this.$el;
|
|
16738
|
-
$el.line = $el.main.select(".".concat(
|
|
16739
|
-
.attr("class",
|
|
16806
|
+
$el.line = $el.main.select(".".concat($COMMON.chart)).append("g")
|
|
16807
|
+
.attr("class", $LINE.chartLines);
|
|
16740
16808
|
},
|
|
16741
16809
|
updateTargetsForLine: function (t) {
|
|
16742
16810
|
var $$ = this;
|
|
@@ -16748,8 +16816,8 @@ var shapeLine = {
|
|
|
16748
16816
|
$$.initLine();
|
|
16749
16817
|
}
|
|
16750
16818
|
var targets = t.filter(function (d) { return !($$.isScatterType(d) || $$.isBubbleType(d)); });
|
|
16751
|
-
var mainLineUpdate = main.select(".".concat(
|
|
16752
|
-
.selectAll(".".concat(
|
|
16819
|
+
var mainLineUpdate = main.select(".".concat($LINE.chartLines))
|
|
16820
|
+
.selectAll(".".concat($LINE.chartLine))
|
|
16753
16821
|
.data(targets)
|
|
16754
16822
|
.attr("class", function (d) { return classChartLine(d) + classFocus(d); });
|
|
16755
16823
|
var mainLineEnter = mainLineUpdate.enter().append("g")
|
|
@@ -16777,8 +16845,8 @@ var shapeLine = {
|
|
|
16777
16845
|
var extraLineClasses = $$.format.extraLineClasses, $el = $$.$el, $T = $$.$T;
|
|
16778
16846
|
var $root = isSub ? $el.subchart : $el;
|
|
16779
16847
|
var line = $root.main
|
|
16780
|
-
.selectAll(".".concat(
|
|
16781
|
-
.selectAll(".".concat(
|
|
16848
|
+
.selectAll(".".concat($LINE.lines))
|
|
16849
|
+
.selectAll(".".concat($LINE.line))
|
|
16782
16850
|
.data($$.lineData.bind($$));
|
|
16783
16851
|
$T(line.exit(), withTransition)
|
|
16784
16852
|
.style("opacity", "0")
|
|
@@ -17023,10 +17091,10 @@ var shapePoint = {
|
|
|
17023
17091
|
var $$ = this;
|
|
17024
17092
|
var main = $$.$el.main;
|
|
17025
17093
|
$$.point = $$.generatePoint();
|
|
17026
|
-
if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select(".".concat(
|
|
17027
|
-
main.select(".".concat(
|
|
17094
|
+
if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select(".".concat($CIRCLE.chartCircles)).empty()) {
|
|
17095
|
+
main.select(".".concat($COMMON.chart))
|
|
17028
17096
|
.append("g")
|
|
17029
|
-
.attr("class",
|
|
17097
|
+
.attr("class", $CIRCLE.chartCircles);
|
|
17030
17098
|
}
|
|
17031
17099
|
},
|
|
17032
17100
|
updateTargetForCircle: function (targetsValue, enterNodeValue) {
|
|
@@ -17046,9 +17114,9 @@ var shapePoint = {
|
|
|
17046
17114
|
if (!targets) {
|
|
17047
17115
|
targets = (data.targets)
|
|
17048
17116
|
.filter(function (d) { return _this.isScatterType(d) || _this.isBubbleType(d); });
|
|
17049
|
-
var mainCircle = $el.main.select(".".concat(
|
|
17117
|
+
var mainCircle = $el.main.select(".".concat($CIRCLE.chartCircles))
|
|
17050
17118
|
.style("pointer-events", "none")
|
|
17051
|
-
.selectAll(".".concat(
|
|
17119
|
+
.selectAll(".".concat($CIRCLE.circles))
|
|
17052
17120
|
.data(targets)
|
|
17053
17121
|
.attr("class", classCircles);
|
|
17054
17122
|
mainCircle.exit().remove();
|
|
@@ -17056,14 +17124,14 @@ var shapePoint = {
|
|
|
17056
17124
|
}
|
|
17057
17125
|
// Circles for each data point on lines
|
|
17058
17126
|
selectionEnabled && enterNode.append("g")
|
|
17059
|
-
.attr("class", function (d) { return $$.generateClass(
|
|
17127
|
+
.attr("class", function (d) { return $$.generateClass($SELECT.selectedCircles, d.id); });
|
|
17060
17128
|
enterNode.append("g")
|
|
17061
17129
|
.attr("class", classCircles)
|
|
17062
17130
|
.style("cursor", function (d) { return (isFunction(isSelectable) && isSelectable(d) ? "pointer" : null); });
|
|
17063
17131
|
// Update date for selected circles
|
|
17064
17132
|
selectionEnabled && targets.forEach(function (t) {
|
|
17065
|
-
$el.main.selectAll(".".concat(
|
|
17066
|
-
.selectAll("".concat(
|
|
17133
|
+
$el.main.selectAll(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(t.id)))
|
|
17134
|
+
.selectAll("".concat($SELECT.selectedCircle))
|
|
17067
17135
|
.each(function (d) {
|
|
17068
17136
|
d.value = t.values[d.index].value;
|
|
17069
17137
|
});
|
|
@@ -17076,8 +17144,8 @@ var shapePoint = {
|
|
|
17076
17144
|
var focusOnly = config.point_focus_only;
|
|
17077
17145
|
var $root = isSub ? $el.subchart : $el;
|
|
17078
17146
|
if (config.point_show && !state.toggling) {
|
|
17079
|
-
var circles = $root.main.selectAll(".".concat(
|
|
17080
|
-
.selectAll(".".concat(
|
|
17147
|
+
var circles = $root.main.selectAll(".".concat($CIRCLE.circles))
|
|
17148
|
+
.selectAll(".".concat($CIRCLE.circle))
|
|
17081
17149
|
.data(function (d) { return (($$.isLineType(d) && $$.shouldDrawPointsForLine(d)) ||
|
|
17082
17150
|
$$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ?
|
|
17083
17151
|
(focusOnly ? [d.values[0]] : d.values) : []); });
|
|
@@ -17085,7 +17153,7 @@ var shapePoint = {
|
|
|
17085
17153
|
circles.enter()
|
|
17086
17154
|
.filter(Boolean)
|
|
17087
17155
|
.append($$.point("create", this, $$.pointR.bind($$), $$.color));
|
|
17088
|
-
$root.circle = $root.main.selectAll(".".concat(
|
|
17156
|
+
$root.circle = $root.main.selectAll(".".concat($CIRCLE.circles, " .").concat($CIRCLE.circle))
|
|
17089
17157
|
.style("stroke", $$.color)
|
|
17090
17158
|
.style("opacity", $$.initialOpacityForCircle.bind($$));
|
|
17091
17159
|
}
|
|
@@ -17095,7 +17163,7 @@ var shapePoint = {
|
|
|
17095
17163
|
var $$ = this;
|
|
17096
17164
|
var rendered = $$.state.rendered, $el = $$.$el, $T = $$.$T;
|
|
17097
17165
|
var $root = isSub ? $el.subchart : $el;
|
|
17098
|
-
var selectedCircles = $root.main.selectAll(".".concat(
|
|
17166
|
+
var selectedCircles = $root.main.selectAll(".".concat($SELECT.selectedCircle));
|
|
17099
17167
|
if (!$$.config.point_show) {
|
|
17100
17168
|
return [];
|
|
17101
17169
|
}
|
|
@@ -17184,7 +17252,7 @@ var shapePoint = {
|
|
|
17184
17252
|
var $$ = this;
|
|
17185
17253
|
var r = $$.pointExpandedR.bind($$);
|
|
17186
17254
|
reset && $$.unexpandCircles();
|
|
17187
|
-
var circles = $$.getShapeByIndex("circle", i, id).classed(
|
|
17255
|
+
var circles = $$.getShapeByIndex("circle", i, id).classed($COMMON.EXPANDED, true);
|
|
17188
17256
|
var scale = r(circles) / $$.config.point_r;
|
|
17189
17257
|
var ratio = 1 - scale;
|
|
17190
17258
|
if ($$.isCirclePoint()) {
|
|
@@ -17211,9 +17279,9 @@ var shapePoint = {
|
|
|
17211
17279
|
var r = $$.pointR.bind($$);
|
|
17212
17280
|
var circles = $$.getShapeByIndex("circle", i)
|
|
17213
17281
|
.filter(function () {
|
|
17214
|
-
return select(this).classed(
|
|
17282
|
+
return select(this).classed($COMMON.EXPANDED);
|
|
17215
17283
|
})
|
|
17216
|
-
.classed(
|
|
17284
|
+
.classed($COMMON.EXPANDED, false);
|
|
17217
17285
|
circles.attr("r", r);
|
|
17218
17286
|
!$$.isCirclePoint() &&
|
|
17219
17287
|
circles.attr("transform", "scale(".concat(r(circles) / $$.config.point_r, ")"));
|
|
@@ -17299,8 +17367,8 @@ var shapePoint = {
|
|
|
17299
17367
|
pointClass = d === true ?
|
|
17300
17368
|
circle.each(function (d) {
|
|
17301
17369
|
var className = $$.getClass("circle", true)(d);
|
|
17302
|
-
if (this.getAttribute("class").indexOf(
|
|
17303
|
-
className += " ".concat(
|
|
17370
|
+
if (this.getAttribute("class").indexOf($COMMON.EXPANDED) > -1) {
|
|
17371
|
+
className += " ".concat($COMMON.EXPANDED);
|
|
17304
17372
|
}
|
|
17305
17373
|
this.setAttribute("class", className);
|
|
17306
17374
|
}) : $$.getClass("circle", true)(d);
|
|
@@ -17481,17 +17549,17 @@ var shapeRadar = {
|
|
|
17481
17549
|
var $$ = this;
|
|
17482
17550
|
var config = $$.config, current = $$.state.current, $el = $$.$el;
|
|
17483
17551
|
if ($$.hasType("radar")) {
|
|
17484
|
-
$el.radar = $el.main.select(".".concat(
|
|
17485
|
-
.attr("class",
|
|
17552
|
+
$el.radar = $el.main.select(".".concat($COMMON.chart)).append("g")
|
|
17553
|
+
.attr("class", $RADAR.chartRadars);
|
|
17486
17554
|
// level
|
|
17487
17555
|
$el.radar.levels = $el.radar.append("g")
|
|
17488
|
-
.attr("class",
|
|
17556
|
+
.attr("class", $RADAR.levels);
|
|
17489
17557
|
// axis
|
|
17490
17558
|
$el.radar.axes = $el.radar.append("g")
|
|
17491
|
-
.attr("class",
|
|
17559
|
+
.attr("class", $AXIS.axis);
|
|
17492
17560
|
// shapes
|
|
17493
17561
|
$el.radar.shapes = $el.radar.append("g")
|
|
17494
|
-
.attr("class",
|
|
17562
|
+
.attr("class", $SHAPE.shapes);
|
|
17495
17563
|
current.dataMax = config.radar_axis_max || $$.getMinMaxData().max[0].value;
|
|
17496
17564
|
}
|
|
17497
17565
|
},
|
|
@@ -17545,7 +17613,7 @@ var shapeRadar = {
|
|
|
17545
17613
|
// Adjust radar, circles and texts' position
|
|
17546
17614
|
if (translate) {
|
|
17547
17615
|
radar.attr("transform", translate);
|
|
17548
|
-
main.select(".".concat(
|
|
17616
|
+
main.select(".".concat($TEXT.chartTexts)).attr("transform", translate);
|
|
17549
17617
|
$$.generateRadarPoints();
|
|
17550
17618
|
$$.updateRadarLevel();
|
|
17551
17619
|
$$.updateRadarAxes();
|
|
@@ -17583,11 +17651,11 @@ var shapeRadar = {
|
|
|
17583
17651
|
return pos.join(" ");
|
|
17584
17652
|
});
|
|
17585
17653
|
var level = radarLevels
|
|
17586
|
-
.selectAll(".".concat(
|
|
17654
|
+
.selectAll(".".concat($RADAR.level))
|
|
17587
17655
|
.data(levelData);
|
|
17588
17656
|
level.exit().remove();
|
|
17589
17657
|
var levelEnter = level.enter().append("g")
|
|
17590
|
-
.attr("class", function (d, i) { return "".concat(
|
|
17658
|
+
.attr("class", function (d, i) { return "".concat($RADAR.level, " ").concat($RADAR.level, "-").concat(i); });
|
|
17591
17659
|
levelEnter.append("polygon")
|
|
17592
17660
|
.style("visibility", config.radar_level_show ? null : "hidden");
|
|
17593
17661
|
if (showText) {
|
|
@@ -17625,7 +17693,7 @@ var shapeRadar = {
|
|
|
17625
17693
|
.data(categories);
|
|
17626
17694
|
axis.exit().remove();
|
|
17627
17695
|
var axisEnter = axis.enter().append("g")
|
|
17628
|
-
.attr("class", function (d, i) { return "".concat(
|
|
17696
|
+
.attr("class", function (d, i) { return "".concat($AXIS.axis, "-").concat(i); });
|
|
17629
17697
|
config.radar_axis_line_show && axisEnter.append("line");
|
|
17630
17698
|
config.radar_axis_text_show && axisEnter.append("text");
|
|
17631
17699
|
axis = axisEnter.merge(axis);
|
|
@@ -18720,10 +18788,10 @@ var apiSelection = {
|
|
|
18720
18788
|
selected: function (targetId) {
|
|
18721
18789
|
var $$ = this.internal;
|
|
18722
18790
|
var dataPoint = [];
|
|
18723
|
-
$$.$el.main.selectAll(".".concat(
|
|
18724
|
-
.selectAll(".".concat(
|
|
18791
|
+
$$.$el.main.selectAll(".".concat($SHAPE.shapes + $$.getTargetSelectorSuffix(targetId)))
|
|
18792
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
18725
18793
|
.filter(function () {
|
|
18726
|
-
return select(this).classed(
|
|
18794
|
+
return select(this).classed($SELECT.SELECTED);
|
|
18727
18795
|
})
|
|
18728
18796
|
.each(function (d) { return dataPoint.push(d); });
|
|
18729
18797
|
return dataPoint;
|
|
@@ -18758,26 +18826,26 @@ var apiSelection = {
|
|
|
18758
18826
|
if (!config.data_selection_enabled) {
|
|
18759
18827
|
return;
|
|
18760
18828
|
}
|
|
18761
|
-
$el.main.selectAll(".".concat(
|
|
18762
|
-
.selectAll(".".concat(
|
|
18829
|
+
$el.main.selectAll(".".concat($SHAPE.shapes))
|
|
18830
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
18763
18831
|
.each(function (d, i) {
|
|
18764
18832
|
var shape = select(this);
|
|
18765
18833
|
var id = d.data ? d.data.id : d.id;
|
|
18766
18834
|
var toggle = $$.getToggle(this, d).bind($$);
|
|
18767
18835
|
var isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;
|
|
18768
18836
|
var isTargetIndex = !indices || indices.indexOf(i) >= 0;
|
|
18769
|
-
var isSelected = shape.classed(
|
|
18837
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
18770
18838
|
// line/area selection not supported yet
|
|
18771
|
-
if (shape.classed(
|
|
18839
|
+
if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
|
|
18772
18840
|
return;
|
|
18773
18841
|
}
|
|
18774
18842
|
if (isTargetId && isTargetIndex) {
|
|
18775
18843
|
if (config.data_selection_isselectable.bind($$.api)(d) && !isSelected) {
|
|
18776
|
-
toggle(true, shape.classed(
|
|
18844
|
+
toggle(true, shape.classed($SELECT.SELECTED, true), d, i);
|
|
18777
18845
|
}
|
|
18778
18846
|
}
|
|
18779
18847
|
else if (isDefined(resetOther) && resetOther && isSelected) {
|
|
18780
|
-
toggle(false, shape.classed(
|
|
18848
|
+
toggle(false, shape.classed($SELECT.SELECTED, false), d, i);
|
|
18781
18849
|
}
|
|
18782
18850
|
});
|
|
18783
18851
|
},
|
|
@@ -18804,24 +18872,24 @@ var apiSelection = {
|
|
|
18804
18872
|
if (!config.data_selection_enabled) {
|
|
18805
18873
|
return;
|
|
18806
18874
|
}
|
|
18807
|
-
$el.main.selectAll(".".concat(
|
|
18808
|
-
.selectAll(".".concat(
|
|
18875
|
+
$el.main.selectAll(".".concat($SHAPE.shapes))
|
|
18876
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
18809
18877
|
.each(function (d, i) {
|
|
18810
18878
|
var shape = select(this);
|
|
18811
18879
|
var id = d.data ? d.data.id : d.id;
|
|
18812
18880
|
var toggle = $$.getToggle(this, d).bind($$);
|
|
18813
18881
|
var isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;
|
|
18814
18882
|
var isTargetIndex = !indices || indices.indexOf(i) >= 0;
|
|
18815
|
-
var isSelected = shape.classed(
|
|
18883
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
18816
18884
|
// line/area selection not supported yet
|
|
18817
|
-
if (shape.classed(
|
|
18885
|
+
if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
|
|
18818
18886
|
return;
|
|
18819
18887
|
}
|
|
18820
18888
|
if (isTargetId &&
|
|
18821
18889
|
isTargetIndex &&
|
|
18822
18890
|
config.data_selection_isselectable.bind($$.api)(d) &&
|
|
18823
18891
|
isSelected) {
|
|
18824
|
-
toggle(false, shape.classed(
|
|
18892
|
+
toggle(false, shape.classed($SELECT.SELECTED, false), d, i);
|
|
18825
18893
|
}
|
|
18826
18894
|
});
|
|
18827
18895
|
}
|
|
@@ -18857,6 +18925,7 @@ var apiSubchart = {
|
|
|
18857
18925
|
* chart.subchart.show();
|
|
18858
18926
|
*/
|
|
18859
18927
|
show: function () {
|
|
18928
|
+
var _a, _b;
|
|
18860
18929
|
var $$ = this.internal;
|
|
18861
18930
|
var subchart = $$.$el.subchart, config = $$.config;
|
|
18862
18931
|
var show = config.subchart_show;
|
|
@@ -18865,16 +18934,16 @@ var apiSubchart = {
|
|
|
18865
18934
|
$$.unbindZoomEvent();
|
|
18866
18935
|
config.subchart_show = !show;
|
|
18867
18936
|
!subchart.main && $$.initSubchart();
|
|
18868
|
-
var $target = subchart.main.selectAll(".".concat(
|
|
18937
|
+
var $target = subchart.main.selectAll(".".concat($COMMON.target));
|
|
18869
18938
|
// need to cover when new data has been loaded
|
|
18870
18939
|
if ($$.data.targets.length !== $target.size()) {
|
|
18871
18940
|
$$.updateSizes();
|
|
18872
18941
|
$$.updateTargetsForSubchart($$.data.targets);
|
|
18873
|
-
$target = subchart.main.selectAll(".".concat(
|
|
18942
|
+
$target = (_a = subchart.main) === null || _a === void 0 ? void 0 : _a.selectAll(".".concat($COMMON.target));
|
|
18874
18943
|
}
|
|
18875
|
-
$target.style("opacity", null);
|
|
18876
|
-
subchart.main.style("display", null);
|
|
18877
|
-
this.
|
|
18944
|
+
$target === null || $target === void 0 ? void 0 : $target.style("opacity", null);
|
|
18945
|
+
(_b = subchart.main) === null || _b === void 0 ? void 0 : _b.style("display", null);
|
|
18946
|
+
this.resize();
|
|
18878
18947
|
}
|
|
18879
18948
|
},
|
|
18880
18949
|
/**
|
|
@@ -18888,11 +18957,11 @@ var apiSubchart = {
|
|
|
18888
18957
|
*/
|
|
18889
18958
|
hide: function () {
|
|
18890
18959
|
var $$ = this.internal;
|
|
18891
|
-
var
|
|
18892
|
-
if (config.subchart_show &&
|
|
18960
|
+
var main = $$.$el.subchart.main, config = $$.config;
|
|
18961
|
+
if (config.subchart_show && (main === null || main === void 0 ? void 0 : main.style("display")) !== "none") {
|
|
18893
18962
|
config.subchart_show = false;
|
|
18894
|
-
|
|
18895
|
-
this.
|
|
18963
|
+
main.style("display", "none");
|
|
18964
|
+
this.resize();
|
|
18896
18965
|
}
|
|
18897
18966
|
},
|
|
18898
18967
|
/**
|
|
@@ -19156,28 +19225,28 @@ var drag = {
|
|
|
19156
19225
|
var maxX = Math.max(sx, mx);
|
|
19157
19226
|
var minY = isSelectionGrouped ? state.margin.top : Math.min(sy, my);
|
|
19158
19227
|
var maxY = isSelectionGrouped ? state.height : Math.max(sy, my);
|
|
19159
|
-
main.select(".".concat(
|
|
19228
|
+
main.select(".".concat($DRAG.dragarea))
|
|
19160
19229
|
.attr("x", minX)
|
|
19161
19230
|
.attr("y", minY)
|
|
19162
19231
|
.attr("width", maxX - minX)
|
|
19163
19232
|
.attr("height", maxY - minY);
|
|
19164
19233
|
// TODO: binary search when multiple xs
|
|
19165
|
-
main.selectAll(".".concat(
|
|
19166
|
-
.selectAll(".".concat(
|
|
19234
|
+
main.selectAll(".".concat($SHAPE.shapes))
|
|
19235
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
19167
19236
|
.filter(function (d) { return isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind($$.api)(d); })
|
|
19168
19237
|
.each(function (d, i) {
|
|
19169
19238
|
var shape = select(this);
|
|
19170
|
-
var isSelected = shape.classed(
|
|
19171
|
-
var isIncluded = shape.classed(
|
|
19239
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
19240
|
+
var isIncluded = shape.classed($DRAG.INCLUDED);
|
|
19172
19241
|
var isWithin = false;
|
|
19173
19242
|
var toggle;
|
|
19174
|
-
if (shape.classed(
|
|
19243
|
+
if (shape.classed($CIRCLE.circle)) {
|
|
19175
19244
|
var x = +shape.attr("cx") * 1;
|
|
19176
19245
|
var y = +shape.attr("cy") * 1;
|
|
19177
19246
|
toggle = $$.togglePoint;
|
|
19178
19247
|
isWithin = minX < x && x < maxX && minY < y && y < maxY;
|
|
19179
19248
|
}
|
|
19180
|
-
else if (shape.classed(
|
|
19249
|
+
else if (shape.classed($BAR.bar)) {
|
|
19181
19250
|
var _a = getPathBox(this), x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
19182
19251
|
toggle = $$.togglePath;
|
|
19183
19252
|
isWithin = !(maxX < x || x + width < minX) && !(maxY < y || y + height < minY);
|
|
@@ -19188,9 +19257,9 @@ var drag = {
|
|
|
19188
19257
|
}
|
|
19189
19258
|
// @ts-ignore
|
|
19190
19259
|
if (isWithin ^ isIncluded) {
|
|
19191
|
-
shape.classed(
|
|
19260
|
+
shape.classed($DRAG.INCLUDED, !isIncluded);
|
|
19192
19261
|
// TODO: included/unincluded callback here
|
|
19193
|
-
shape.classed(
|
|
19262
|
+
shape.classed($SELECT.SELECTED, !isSelected);
|
|
19194
19263
|
toggle.call($$, !isSelected, shape, d, i);
|
|
19195
19264
|
}
|
|
19196
19265
|
});
|
|
@@ -19208,9 +19277,9 @@ var drag = {
|
|
|
19208
19277
|
return;
|
|
19209
19278
|
}
|
|
19210
19279
|
state.dragStart = mouse;
|
|
19211
|
-
main.select(".".concat(
|
|
19280
|
+
main.select(".".concat($COMMON.chart))
|
|
19212
19281
|
.append("rect")
|
|
19213
|
-
.attr("class",
|
|
19282
|
+
.attr("class", $DRAG.dragarea)
|
|
19214
19283
|
.style("opacity", "0.1");
|
|
19215
19284
|
$$.setDragStatus(true);
|
|
19216
19285
|
},
|
|
@@ -19225,11 +19294,11 @@ var drag = {
|
|
|
19225
19294
|
if ($$.hasArcType() || !config.data_selection_enabled) { // do nothing if not selectable
|
|
19226
19295
|
return;
|
|
19227
19296
|
}
|
|
19228
|
-
$T(main.select(".".concat(
|
|
19297
|
+
$T(main.select(".".concat($DRAG.dragarea)))
|
|
19229
19298
|
.style("opacity", "0")
|
|
19230
19299
|
.remove();
|
|
19231
|
-
main.selectAll(".".concat(
|
|
19232
|
-
.classed(
|
|
19300
|
+
main.selectAll(".".concat($SHAPE.shape))
|
|
19301
|
+
.classed($DRAG.INCLUDED, false);
|
|
19233
19302
|
$$.setDragStatus(false);
|
|
19234
19303
|
}
|
|
19235
19304
|
};
|
|
@@ -19251,12 +19320,12 @@ var selection = _assign(_assign({}, drag), {
|
|
|
19251
19320
|
var r = $$.pointSelectR.bind($$);
|
|
19252
19321
|
callFn(config.data_onselected, $$.api, d, target.node());
|
|
19253
19322
|
// add selected-circle on low layer g
|
|
19254
|
-
$T(main.select(".".concat(
|
|
19255
|
-
.selectAll(".".concat(
|
|
19323
|
+
$T(main.select(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
|
|
19324
|
+
.selectAll(".".concat($SELECT.selectedCircle, "-").concat(i))
|
|
19256
19325
|
.data([d])
|
|
19257
19326
|
.enter()
|
|
19258
19327
|
.append("circle")
|
|
19259
|
-
.attr("class", function () { return $$.generateClass(
|
|
19328
|
+
.attr("class", function () { return $$.generateClass($SELECT.selectedCircle, i); })
|
|
19260
19329
|
.attr("cx", cx)
|
|
19261
19330
|
.attr("cy", cy)
|
|
19262
19331
|
.attr("stroke", $$.color)
|
|
@@ -19274,8 +19343,8 @@ var selection = _assign(_assign({}, drag), {
|
|
|
19274
19343
|
var config = $$.config, main = $$.$el.main, $T = $$.$T;
|
|
19275
19344
|
callFn(config.data_onunselected, $$.api, d, target.node());
|
|
19276
19345
|
// remove selected-circle from low layer g
|
|
19277
|
-
$T(main.select(".".concat(
|
|
19278
|
-
.selectAll(".".concat(
|
|
19346
|
+
$T(main.select(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
|
|
19347
|
+
.selectAll(".".concat($SELECT.selectedCircle, "-").concat(i)))
|
|
19279
19348
|
.attr("r", 0)
|
|
19280
19349
|
.remove();
|
|
19281
19350
|
},
|
|
@@ -19354,29 +19423,29 @@ var selection = _assign(_assign({}, drag), {
|
|
|
19354
19423
|
toggleShape: function (that, d, i) {
|
|
19355
19424
|
var $$ = this;
|
|
19356
19425
|
var config = $$.config, main = $$.$el.main;
|
|
19357
|
-
var shape = select(that);
|
|
19358
|
-
var isSelected = shape.classed(CLASS.SELECTED);
|
|
19359
|
-
var toggle = $$.getToggle(that, d).bind($$);
|
|
19360
|
-
var toggledShape;
|
|
19361
19426
|
if (config.data_selection_enabled && config.data_selection_isselectable.bind($$.api)(d)) {
|
|
19427
|
+
var shape = select(that);
|
|
19428
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
19429
|
+
var toggle_1 = $$.getToggle(that, d).bind($$);
|
|
19430
|
+
var toggledShape_1;
|
|
19362
19431
|
if (!config.data_selection_multiple) {
|
|
19363
|
-
var selector = ".".concat(
|
|
19432
|
+
var selector = ".".concat($SHAPE.shapes);
|
|
19364
19433
|
if (config.data_selection_grouped) {
|
|
19365
19434
|
selector += $$.getTargetSelectorSuffix(d.id);
|
|
19366
19435
|
}
|
|
19367
19436
|
main.selectAll(selector)
|
|
19368
|
-
.selectAll(".".concat(
|
|
19437
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
19369
19438
|
.each(function (d, i) {
|
|
19370
19439
|
var shape = select(this);
|
|
19371
|
-
if (shape.classed(
|
|
19372
|
-
|
|
19373
|
-
|
|
19440
|
+
if (shape.classed($SELECT.SELECTED)) {
|
|
19441
|
+
toggledShape_1 = shape;
|
|
19442
|
+
toggle_1(false, shape.classed($SELECT.SELECTED, false), d, i);
|
|
19374
19443
|
}
|
|
19375
19444
|
});
|
|
19376
19445
|
}
|
|
19377
|
-
if (!
|
|
19378
|
-
shape.classed(
|
|
19379
|
-
|
|
19446
|
+
if (!toggledShape_1 || toggledShape_1.node() !== shape.node()) {
|
|
19447
|
+
shape.classed($SELECT.SELECTED, !isSelected);
|
|
19448
|
+
toggle_1(!isSelected, shape, d, i);
|
|
19380
19449
|
}
|
|
19381
19450
|
}
|
|
19382
19451
|
} });
|
|
@@ -19941,7 +20010,7 @@ var zoom = {
|
|
|
19941
20010
|
if (!zoomRect) {
|
|
19942
20011
|
zoomRect = $$.$el.main.append("rect")
|
|
19943
20012
|
.attr("clip-path", state.clip.path)
|
|
19944
|
-
.attr("class",
|
|
20013
|
+
.attr("class", $ZOOM.zoomBrush)
|
|
19945
20014
|
.attr("width", isRotated ? state.width : 0)
|
|
19946
20015
|
.attr("height", isRotated ? 0 : state.height);
|
|
19947
20016
|
}
|
|
@@ -19985,13 +20054,13 @@ var zoom = {
|
|
|
19985
20054
|
if (resetButton && config.zoom_type === "drag") {
|
|
19986
20055
|
if (!$el.zoomResetBtn) {
|
|
19987
20056
|
$el.zoomResetBtn = $$.$el.chart.append("div")
|
|
19988
|
-
.classed(
|
|
20057
|
+
.classed($COMMON.button, true)
|
|
19989
20058
|
.append("span")
|
|
19990
20059
|
.on("click", function () {
|
|
19991
20060
|
isFunction(resetButton.onclick) && resetButton.onclick.bind($$.api)(this);
|
|
19992
20061
|
$$.api.unzoom();
|
|
19993
20062
|
})
|
|
19994
|
-
.classed(
|
|
20063
|
+
.classed($ZOOM.buttonZoomReset, true)
|
|
19995
20064
|
.text(resetButton.text || "Reset Zoom");
|
|
19996
20065
|
}
|
|
19997
20066
|
else {
|
|
@@ -20322,7 +20391,7 @@ var zoomModule = function () {
|
|
|
20322
20391
|
var defaults = {};
|
|
20323
20392
|
/**
|
|
20324
20393
|
* @namespace bb
|
|
20325
|
-
* @version 3.3.
|
|
20394
|
+
* @version 3.3.3
|
|
20326
20395
|
*/
|
|
20327
20396
|
var bb = {
|
|
20328
20397
|
/**
|
|
@@ -20332,7 +20401,7 @@ var bb = {
|
|
|
20332
20401
|
* bb.version; // "1.0.0"
|
|
20333
20402
|
* @memberof bb
|
|
20334
20403
|
*/
|
|
20335
|
-
version: "3.3.
|
|
20404
|
+
version: "3.3.3",
|
|
20336
20405
|
/**
|
|
20337
20406
|
* Generate chart
|
|
20338
20407
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|