billboard.js 3.3.0-next.1 → 3.3.2
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 +644 -427
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2809 -2331
- package/dist/billboard.pkgd.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
- 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.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-sparkline.js +156 -103
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-stanford.js +154 -101
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-tableview.js +20 -128
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-textoverlap.js +20 -128
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2166 -1905
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2325 -2011
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2320 -2006
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2186 -2033
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2187 -2034
- 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 +642 -440
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -4
- package/dist-esm/plugin/billboardjs-plugin-sparkline.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +131 -79
- package/dist-esm/plugin/billboardjs-plugin-stanford.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +135 -80
- package/dist-esm/plugin/billboardjs-plugin-tableview.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -7
- package/package.json +39 -38
- package/src/Chart/api/chart.ts +8 -2
- package/src/Chart/api/data.ts +3 -4
- 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 +26 -19
- package/src/ChartInternal/ChartInternal.ts +8 -7
- package/src/ChartInternal/data/IData.ts +9 -0
- package/src/ChartInternal/data/data.ts +4 -4
- 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 +46 -14
- 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 -6
- package/src/ChartInternal/internals/transform.ts +5 -5
- package/src/ChartInternal/shape/arc.ts +24 -22
- package/src/ChartInternal/shape/area.ts +4 -4
- package/src/ChartInternal/shape/bar.ts +11 -9
- 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 +12 -10
- package/src/ChartInternal/shape/shape.ts +43 -11
- package/src/Plugin/sparkline/index.ts +4 -4
- package/src/Plugin/stanford/index.ts +3 -3
- package/src/Plugin/stanford/util.ts +0 -1
- package/src/config/Options/axis/x.ts +25 -5
- package/src/config/Options/axis/y.ts +24 -3
- package/src/config/Options/axis/y2.ts +24 -3
- package/src/config/Options/common/tooltip.ts +10 -1
- package/src/config/Options/shape/bar.ts +8 -0
- package/src/config/classes.ts +154 -66
- package/src/module/util.ts +17 -11
- package/types/axis.d.ts +22 -8
- package/types/chart.d.ts +1 -1
- package/types/options.d.ts +32 -32
- package/types/plugin/tableview/index.d.ts +3 -3
- package/types/plugin/tableview/options.d.ts +1 -1
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.2
|
|
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;
|
|
@@ -879,18 +765,27 @@ function isTabVisible() {
|
|
|
879
765
|
* @private
|
|
880
766
|
*/
|
|
881
767
|
function convertInputType(mouse, touch) {
|
|
882
|
-
var
|
|
883
|
-
|
|
884
|
-
if (/Mobi/.test(win.navigator.userAgent) && touch) {
|
|
768
|
+
var hasTouch = false;
|
|
769
|
+
if (touch) {
|
|
885
770
|
// Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
771
|
+
if (win.navigator && "maxTouchPoints" in win.navigator) {
|
|
772
|
+
hasTouch = win.navigator.maxTouchPoints > 0;
|
|
773
|
+
// Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
|
|
774
|
+
// On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
|
|
775
|
+
}
|
|
776
|
+
else if ("ontouchmove" in win || (win.DocumentTouch && doc instanceof win.DocumentTouch)) {
|
|
777
|
+
hasTouch = true;
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
|
|
781
|
+
var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
|
|
782
|
+
if (mQ && mQ.media === "(pointer:coarse)") {
|
|
783
|
+
hasTouch = !!mQ.matches;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
891
786
|
}
|
|
892
|
-
var hasMouse = mouse && !
|
|
893
|
-
return (hasMouse && "mouse") || (
|
|
787
|
+
var hasMouse = mouse && !hasTouch ? ("onmouseover" in win) : false;
|
|
788
|
+
return (hasMouse && "mouse") || (hasTouch && "touch") || null;
|
|
894
789
|
}
|
|
895
790
|
|
|
896
791
|
/**
|
|
@@ -934,6 +829,160 @@ function logError(head, tail) {
|
|
|
934
829
|
throw Error("".concat(prefix, " ").concat(head.replace(/\%c([a-z-]+)/i, "'$1' "), " ").concat(tail));
|
|
935
830
|
}
|
|
936
831
|
|
|
832
|
+
/**
|
|
833
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
834
|
+
* billboard.js project is licensed under the MIT license
|
|
835
|
+
*/
|
|
836
|
+
/**
|
|
837
|
+
* CSS class names definition
|
|
838
|
+
* @private
|
|
839
|
+
*/
|
|
840
|
+
var $COMMON = {
|
|
841
|
+
button: "bb-button",
|
|
842
|
+
chart: "bb-chart",
|
|
843
|
+
empty: "bb-empty",
|
|
844
|
+
main: "bb-main",
|
|
845
|
+
target: "bb-target",
|
|
846
|
+
EXPANDED: "_expanded_"
|
|
847
|
+
};
|
|
848
|
+
var $ARC = {
|
|
849
|
+
arc: "bb-arc",
|
|
850
|
+
arcLabelLine: "bb-arc-label-line",
|
|
851
|
+
arcs: "bb-arcs",
|
|
852
|
+
chartArc: "bb-chart-arc",
|
|
853
|
+
chartArcs: "bb-chart-arcs",
|
|
854
|
+
chartArcsBackground: "bb-chart-arcs-background",
|
|
855
|
+
chartArcsTitle: "bb-chart-arcs-title"
|
|
856
|
+
};
|
|
857
|
+
var $AREA = {
|
|
858
|
+
area: "bb-area",
|
|
859
|
+
areas: "bb-areas"
|
|
860
|
+
};
|
|
861
|
+
var $AXIS = {
|
|
862
|
+
axis: "bb-axis",
|
|
863
|
+
axisX: "bb-axis-x",
|
|
864
|
+
axisXLabel: "bb-axis-x-label",
|
|
865
|
+
axisY: "bb-axis-y",
|
|
866
|
+
axisY2: "bb-axis-y2",
|
|
867
|
+
axisY2Label: "bb-axis-y2-label",
|
|
868
|
+
axisYLabel: "bb-axis-y-label"
|
|
869
|
+
};
|
|
870
|
+
var $BAR = {
|
|
871
|
+
bar: "bb-bar",
|
|
872
|
+
bars: "bb-bars",
|
|
873
|
+
chartBar: "bb-chart-bar",
|
|
874
|
+
chartBars: "bb-chart-bars"
|
|
875
|
+
};
|
|
876
|
+
var $CANDLESTICK = {
|
|
877
|
+
candlestick: "bb-candlestick",
|
|
878
|
+
candlesticks: "bb-candlesticks",
|
|
879
|
+
chartCandlestick: "bb-chart-candlestick",
|
|
880
|
+
chartCandlesticks: "bb-chart-candlesticks",
|
|
881
|
+
valueDown: "bb-value-down",
|
|
882
|
+
valueUp: "bb-value-up"
|
|
883
|
+
};
|
|
884
|
+
var $CIRCLE = {
|
|
885
|
+
chartCircles: "bb-chart-circles",
|
|
886
|
+
circle: "bb-circle",
|
|
887
|
+
circles: "bb-circles"
|
|
888
|
+
};
|
|
889
|
+
var $COLOR = {
|
|
890
|
+
colorPattern: "bb-color-pattern",
|
|
891
|
+
colorScale: "bb-colorscale"
|
|
892
|
+
};
|
|
893
|
+
var $DRAG = {
|
|
894
|
+
dragarea: "bb-dragarea",
|
|
895
|
+
INCLUDED: "_included_"
|
|
896
|
+
};
|
|
897
|
+
var $GAUGE = {
|
|
898
|
+
chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
|
|
899
|
+
chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
|
|
900
|
+
chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
|
|
901
|
+
chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
|
|
902
|
+
gaugeValue: "bb-gauge-value"
|
|
903
|
+
};
|
|
904
|
+
var $LEGEND = {
|
|
905
|
+
legend: "bb-legend",
|
|
906
|
+
legendBackground: "bb-legend-background",
|
|
907
|
+
legendItem: "bb-legend-item",
|
|
908
|
+
legendItemEvent: "bb-legend-item-event",
|
|
909
|
+
legendItemHidden: "bb-legend-item-hidden",
|
|
910
|
+
legendItemPoint: "bb-legend-item-point",
|
|
911
|
+
legendItemTile: "bb-legend-item-tile"
|
|
912
|
+
};
|
|
913
|
+
var $LINE = {
|
|
914
|
+
chartLine: "bb-chart-line",
|
|
915
|
+
chartLines: "bb-chart-lines",
|
|
916
|
+
line: "bb-line",
|
|
917
|
+
lines: "bb-lines"
|
|
918
|
+
};
|
|
919
|
+
var $EVENT = {
|
|
920
|
+
eventRect: "bb-event-rect",
|
|
921
|
+
eventRects: "bb-event-rects",
|
|
922
|
+
eventRectsMultiple: "bb-event-rects-multiple",
|
|
923
|
+
eventRectsSingle: "bb-event-rects-single"
|
|
924
|
+
};
|
|
925
|
+
var $FOCUS = {
|
|
926
|
+
focused: "bb-focused",
|
|
927
|
+
defocused: "bb-defocused",
|
|
928
|
+
legendItemFocused: "bb-legend-item-focused",
|
|
929
|
+
xgridFocus: "bb-xgrid-focus",
|
|
930
|
+
ygridFocus: "bb-ygrid-focus"
|
|
931
|
+
};
|
|
932
|
+
var $GRID = {
|
|
933
|
+
grid: "bb-grid",
|
|
934
|
+
gridLines: "bb-grid-lines",
|
|
935
|
+
xgrid: "bb-xgrid",
|
|
936
|
+
xgridLine: "bb-xgrid-line",
|
|
937
|
+
xgridLines: "bb-xgrid-lines",
|
|
938
|
+
xgrids: "bb-xgrids",
|
|
939
|
+
ygrid: "bb-ygrid",
|
|
940
|
+
ygridLine: "bb-ygrid-line",
|
|
941
|
+
ygridLines: "bb-ygrid-lines",
|
|
942
|
+
ygrids: "bb-ygrids"
|
|
943
|
+
};
|
|
944
|
+
var $RADAR = {
|
|
945
|
+
chartRadar: "bb-chart-radar",
|
|
946
|
+
chartRadars: "bb-chart-radars",
|
|
947
|
+
level: "bb-level",
|
|
948
|
+
levels: "bb-levels"
|
|
949
|
+
};
|
|
950
|
+
var $REGION = {
|
|
951
|
+
region: "bb-region",
|
|
952
|
+
regions: "bb-regions"
|
|
953
|
+
};
|
|
954
|
+
var $SELECT = {
|
|
955
|
+
selectedCircle: "bb-selected-circle",
|
|
956
|
+
selectedCircles: "bb-selected-circles",
|
|
957
|
+
SELECTED: "_selected_"
|
|
958
|
+
};
|
|
959
|
+
var $SHAPE = {
|
|
960
|
+
shape: "bb-shape",
|
|
961
|
+
shapes: "bb-shapes"
|
|
962
|
+
};
|
|
963
|
+
var $SUBCHART = {
|
|
964
|
+
brush: "bb-brush",
|
|
965
|
+
subchart: "bb-subchart"
|
|
966
|
+
};
|
|
967
|
+
var $TEXT = {
|
|
968
|
+
chartText: "bb-chart-text",
|
|
969
|
+
chartTexts: "bb-chart-texts",
|
|
970
|
+
text: "bb-text",
|
|
971
|
+
texts: "bb-texts",
|
|
972
|
+
title: "bb-title",
|
|
973
|
+
TextOverlapping: "text-overlapping"
|
|
974
|
+
};
|
|
975
|
+
var $TOOLTIP = {
|
|
976
|
+
tooltip: "bb-tooltip",
|
|
977
|
+
tooltipContainer: "bb-tooltip-container",
|
|
978
|
+
tooltipName: "bb-tooltip-name"
|
|
979
|
+
};
|
|
980
|
+
var $ZOOM = {
|
|
981
|
+
buttonZoomReset: "bb-zoom-reset",
|
|
982
|
+
zoomBrush: "bb-zoom-brush"
|
|
983
|
+
};
|
|
984
|
+
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);
|
|
985
|
+
|
|
937
986
|
/**
|
|
938
987
|
* Elements class.
|
|
939
988
|
* @class Elements
|
|
@@ -2627,7 +2676,16 @@ var tooltip$2 = {
|
|
|
2627
2676
|
* - `element {SVGElement}`: Tooltip event bound element
|
|
2628
2677
|
* - `pos {object}`: Current position of the tooltip.
|
|
2629
2678
|
* @property {Function|object} [tooltip.contents] Set custom HTML for the tooltip.<br>
|
|
2630
|
-
*
|
|
2679
|
+
* If tooltip.grouped is true, data includes multiple data points.<br><br>
|
|
2680
|
+
* Specified function receives `data` array and `defaultTitleFormat`, `defaultValueFormat` and `color` functions of the data point to show.
|
|
2681
|
+
* - **Note:**
|
|
2682
|
+
* - defaultTitleFormat:
|
|
2683
|
+
* - if `axis.x.tick.format` option will be used if set.
|
|
2684
|
+
* - otherwise, will return funciton based on tick format type(category, timeseries).
|
|
2685
|
+
* - defaultValueFormat:
|
|
2686
|
+
* - for Arc type (except gauge, radar), the function will return value from `(ratio * 100).toFixed(1)`.
|
|
2687
|
+
* - for Axis based types, will be used `axis.[y|y2].tick.format` option value if is set.
|
|
2688
|
+
* - otherwise, will parse value and return as number.
|
|
2631
2689
|
* @property {string|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.
|
|
2632
2690
|
* - **NOTE:** When is specified, will not be updating tooltip's position.
|
|
2633
2691
|
* @property {string} [tooltip.contents.template=undefined] Set tooltip's template.<br><br>
|
|
@@ -3416,7 +3474,7 @@ var data$1 = {
|
|
|
3416
3474
|
var value = $$.filterTargetsToShow($$.data.targets)
|
|
3417
3475
|
.map(function (t) { return $$.addName($$.getValueOnIndex(t.values, index)); });
|
|
3418
3476
|
if (filterNull) {
|
|
3419
|
-
value = value.filter(function (v) { return isValue(v.value); });
|
|
3477
|
+
value = value.filter(function (v) { return v && "value" in v && isValue(v.value); });
|
|
3420
3478
|
}
|
|
3421
3479
|
return value;
|
|
3422
3480
|
},
|
|
@@ -3899,8 +3957,8 @@ var data$1 = {
|
|
|
3899
3957
|
.filter(function (v) { return $$.isBarType(v.id) || $$.isCandlestickType(v.id); })
|
|
3900
3958
|
.forEach(function (v) {
|
|
3901
3959
|
var selector = $$.isBarType(v.id) ?
|
|
3902
|
-
".".concat(
|
|
3903
|
-
".".concat(
|
|
3960
|
+
".".concat($BAR.chartBar, ".").concat($COMMON.target).concat($$.getTargetSelectorSuffix(v.id), " .").concat($BAR.bar, "-").concat(v.index) :
|
|
3961
|
+
".".concat($CANDLESTICK.chartCandlestick, ".").concat($COMMON.target).concat($$.getTargetSelectorSuffix(v.id), " .").concat($CANDLESTICK.candlestick, "-").concat(v.index, " path");
|
|
3904
3962
|
if (!closest && $$.isWithinBar(main.select(selector).node())) {
|
|
3905
3963
|
closest = v;
|
|
3906
3964
|
}
|
|
@@ -4203,7 +4261,7 @@ var dataLoad = {
|
|
|
4203
4261
|
state.withoutFadeIn[id] = false;
|
|
4204
4262
|
// Remove target's elements
|
|
4205
4263
|
if ($el.legend) {
|
|
4206
|
-
$el.legend.selectAll(".".concat(
|
|
4264
|
+
$el.legend.selectAll(".".concat($LEGEND.legendItem).concat($$.getTargetSelectorSuffix(id))).remove();
|
|
4207
4265
|
}
|
|
4208
4266
|
// Remove target
|
|
4209
4267
|
$$.data.targets = $$.data.targets.filter(function (t) { return t.id !== id; });
|
|
@@ -4234,10 +4292,10 @@ var interaction = {
|
|
|
4234
4292
|
return;
|
|
4235
4293
|
}
|
|
4236
4294
|
}
|
|
4237
|
-
main.selectAll(".".concat(
|
|
4295
|
+
main.selectAll(".".concat($SHAPE.shape, "-").concat(index))
|
|
4238
4296
|
.each(function () {
|
|
4239
4297
|
var _a;
|
|
4240
|
-
select(this).classed(
|
|
4298
|
+
select(this).classed($COMMON.EXPANDED, true);
|
|
4241
4299
|
if (isSelectionEnabled) {
|
|
4242
4300
|
eventRect.style("cursor", isSelectionGrouped ? "pointer" : null);
|
|
4243
4301
|
}
|
|
@@ -4294,8 +4352,8 @@ var interaction = {
|
|
|
4294
4352
|
["bar", "candlestick"]
|
|
4295
4353
|
.filter(function (v) { return $$.$el[v]; })
|
|
4296
4354
|
.forEach(function (v) {
|
|
4297
|
-
reset && $$.$el[v].classed(
|
|
4298
|
-
$$.getShapeByIndex(v, i, id).classed(
|
|
4355
|
+
reset && $$.$el[v].classed($COMMON.EXPANDED, false);
|
|
4356
|
+
$$.getShapeByIndex(v, i, id).classed($COMMON.EXPANDED, expand);
|
|
4299
4357
|
});
|
|
4300
4358
|
},
|
|
4301
4359
|
/**
|
|
@@ -4313,11 +4371,11 @@ var interaction = {
|
|
|
4313
4371
|
var callback_1 = config[isOver ? "data_onover" : "data_onout"].bind($$.api);
|
|
4314
4372
|
config.color_onover && $$.setOverColor(isOver, d, isArc);
|
|
4315
4373
|
if (isArc) {
|
|
4316
|
-
callback_1(d, main.select(".".concat(
|
|
4374
|
+
callback_1(d, main.select(".".concat($ARC.arc).concat($$.getTargetSelectorSuffix(d.id))).node());
|
|
4317
4375
|
}
|
|
4318
4376
|
else if (!config.tooltip_grouped) {
|
|
4319
4377
|
var last_1 = $$.cache.get(KEY.setOverOut) || [];
|
|
4320
|
-
var shape = main.selectAll(".".concat(
|
|
4378
|
+
var shape = main.selectAll(".".concat($SHAPE.shape, "-").concat(d))
|
|
4321
4379
|
.filter(function (d) {
|
|
4322
4380
|
return $$.isWithinShape(this, d);
|
|
4323
4381
|
});
|
|
@@ -4342,7 +4400,7 @@ var interaction = {
|
|
|
4342
4400
|
$$.showCircleFocus($$.getAllValuesOnIndex(d, true)) :
|
|
4343
4401
|
$$.setExpand(d, null, true);
|
|
4344
4402
|
}
|
|
4345
|
-
!$$.isMultipleX() && main.selectAll(".".concat(
|
|
4403
|
+
!$$.isMultipleX() && main.selectAll(".".concat($SHAPE.shape, "-").concat(d))
|
|
4346
4404
|
.each(function (d) {
|
|
4347
4405
|
callback_1(d, this);
|
|
4348
4406
|
});
|
|
@@ -4397,7 +4455,7 @@ var interaction = {
|
|
|
4397
4455
|
var $$ = this;
|
|
4398
4456
|
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
4457
|
var isMultipleX = $$.isMultipleX();
|
|
4400
|
-
var element = (hasRadar ? radar.axes.select(".".concat(
|
|
4458
|
+
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
4459
|
var _c = element.getBoundingClientRect(), width = _c.width, left = _c.left, top = _c.top;
|
|
4402
4460
|
if (hasAxis && !hasRadar && !isMultipleX) {
|
|
4403
4461
|
var coords = eventReceiver.coords[index];
|
|
@@ -4425,10 +4483,39 @@ var interaction = {
|
|
|
4425
4483
|
unbindZoomEvent: function () {
|
|
4426
4484
|
var $$ = this;
|
|
4427
4485
|
var _a = $$.$el, eventRect = _a.eventRect, zoomResetBtn = _a.zoomResetBtn;
|
|
4428
|
-
eventRect
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4486
|
+
eventRect === null || eventRect === void 0 ? void 0 : eventRect.on(".zoom wheel.zoom .drag", null);
|
|
4487
|
+
zoomResetBtn === null || zoomResetBtn === void 0 ? void 0 : zoomResetBtn.on("click", null).style("display", "none");
|
|
4488
|
+
},
|
|
4489
|
+
/**
|
|
4490
|
+
* Unbind all attached events
|
|
4491
|
+
* @private
|
|
4492
|
+
*/
|
|
4493
|
+
unbindAllEvents: function () {
|
|
4494
|
+
var _a;
|
|
4495
|
+
var $$ = this;
|
|
4496
|
+
var _b = $$.$el, arcs = _b.arcs, eventRect = _b.eventRect, legend = _b.legend, region = _b.region, svg = _b.svg, brush = $$.brush;
|
|
4497
|
+
var list = [
|
|
4498
|
+
"wheel",
|
|
4499
|
+
"click",
|
|
4500
|
+
"mouseover",
|
|
4501
|
+
"mousemove",
|
|
4502
|
+
"mouseout",
|
|
4503
|
+
"touchstart",
|
|
4504
|
+
"touchmove",
|
|
4505
|
+
"touchend",
|
|
4506
|
+
"touchstart.eventRect",
|
|
4507
|
+
"touchmove.eventRect",
|
|
4508
|
+
"touchend.eventRect",
|
|
4509
|
+
".brush",
|
|
4510
|
+
".drag",
|
|
4511
|
+
".zoom",
|
|
4512
|
+
"wheel.zoom",
|
|
4513
|
+
"dblclick.zoom"
|
|
4514
|
+
].join(" ");
|
|
4515
|
+
// detach all possible event types
|
|
4516
|
+
[svg, eventRect, region === null || region === void 0 ? void 0 : region.list, brush === null || brush === void 0 ? void 0 : brush.getSelection(), arcs === null || arcs === void 0 ? void 0 : arcs.selectAll("path"), legend === null || legend === void 0 ? void 0 : legend.selectAll("g")]
|
|
4517
|
+
.forEach(function (v) { return v === null || v === void 0 ? void 0 : v.on(list, null); });
|
|
4518
|
+
(_a = $$.unbindZoomEvent) === null || _a === void 0 ? void 0 : _a.call($$);
|
|
4432
4519
|
}
|
|
4433
4520
|
};
|
|
4434
4521
|
|
|
@@ -4587,7 +4674,7 @@ var color = {
|
|
|
4587
4674
|
if (!pattern) {
|
|
4588
4675
|
var delimiter = ";";
|
|
4589
4676
|
var span = doc.createElement("span");
|
|
4590
|
-
span.className =
|
|
4677
|
+
span.className = $COLOR.colorPattern;
|
|
4591
4678
|
span.style.display = "none";
|
|
4592
4679
|
body.appendChild(span);
|
|
4593
4680
|
var content = win.getComputedStyle(span).backgroundImage;
|
|
@@ -4724,8 +4811,8 @@ var color = {
|
|
|
4724
4811
|
}
|
|
4725
4812
|
main.selectAll(isObject(d) ?
|
|
4726
4813
|
// when is Arc type
|
|
4727
|
-
".".concat(
|
|
4728
|
-
".".concat(
|
|
4814
|
+
".".concat($ARC.arc).concat($$.getTargetSelectorSuffix(d.id)) :
|
|
4815
|
+
".".concat($SHAPE.shape, "-").concat(d)).style("fill", color);
|
|
4729
4816
|
}
|
|
4730
4817
|
};
|
|
4731
4818
|
|
|
@@ -4813,7 +4900,7 @@ var domain = {
|
|
|
4813
4900
|
var yDomainMax = $$.getYDomainMinMax(yTargets, "max");
|
|
4814
4901
|
var isZeroBased = __spreadArray([TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER], TYPE_BY_CATEGORY.Line, true).some(function (v) {
|
|
4815
4902
|
var type = v.indexOf("area") > -1 ? "area" : v;
|
|
4816
|
-
return $$.hasType(v, yTargets) && config["".concat(type, "_zerobased")];
|
|
4903
|
+
return $$.hasType(v, yTargets, true) && config["".concat(type, "_zerobased")];
|
|
4817
4904
|
});
|
|
4818
4905
|
// MEMO: avoid inverting domain unexpectedly
|
|
4819
4906
|
yDomainMin = isValue(yMin) ? yMin :
|
|
@@ -5082,10 +5169,12 @@ var format = {
|
|
|
5082
5169
|
*/
|
|
5083
5170
|
getDefaultValueFormat: function () {
|
|
5084
5171
|
var $$ = this;
|
|
5085
|
-
var
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
$$.
|
|
5172
|
+
var defaultArcValueFormat = $$.defaultArcValueFormat, yFormat = $$.yFormat, y2Format = $$.y2Format;
|
|
5173
|
+
var hasArc = $$.hasArcType(null, ["gauge", "radar"]);
|
|
5174
|
+
return function (v, ratio, id) {
|
|
5175
|
+
var format = hasArc ? defaultArcValueFormat : ($$.axis && $$.axis.getId(id) === "y2" ? y2Format : yFormat);
|
|
5176
|
+
return format.call($$, v, ratio);
|
|
5177
|
+
};
|
|
5089
5178
|
},
|
|
5090
5179
|
defaultValueFormat: function (v) {
|
|
5091
5180
|
return isValue(v) ? +v : "";
|
|
@@ -5132,7 +5221,7 @@ var legend$1 = {
|
|
|
5132
5221
|
if (config.legend_show) {
|
|
5133
5222
|
if (!config.legend_contents_bindto) {
|
|
5134
5223
|
$el.legend = $$.$el.svg.append("g")
|
|
5135
|
-
.classed(
|
|
5224
|
+
.classed($LEGEND.legend, true)
|
|
5136
5225
|
.attr("transform", $$.getTranslate("legend"));
|
|
5137
5226
|
}
|
|
5138
5227
|
// MEMO: call here to update legend box and translate for all
|
|
@@ -5167,8 +5256,8 @@ var legend$1 = {
|
|
|
5167
5256
|
$$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz, transitions);
|
|
5168
5257
|
}
|
|
5169
5258
|
// toggle legend state
|
|
5170
|
-
$el.legend.selectAll(".".concat(
|
|
5171
|
-
.classed(
|
|
5259
|
+
$el.legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5260
|
+
.classed($LEGEND.legendItemHidden, function (id) {
|
|
5172
5261
|
var hide = !$$.isTargetToShow(id);
|
|
5173
5262
|
if (hide) {
|
|
5174
5263
|
this.style.opacity = null;
|
|
@@ -5284,7 +5373,7 @@ var legend$1 = {
|
|
|
5284
5373
|
updateLegendItemColor: function (id, color) {
|
|
5285
5374
|
var legend = this.$el.legend;
|
|
5286
5375
|
if (legend) {
|
|
5287
|
-
legend.select(".".concat(
|
|
5376
|
+
legend.select(".".concat($LEGEND.legendItem, "-").concat(id, " line"))
|
|
5288
5377
|
.style("stroke", color);
|
|
5289
5378
|
}
|
|
5290
5379
|
},
|
|
@@ -5317,7 +5406,7 @@ var legend$1 = {
|
|
|
5317
5406
|
* @private
|
|
5318
5407
|
*/
|
|
5319
5408
|
opacityForUnfocusedLegend: function (legendItem) {
|
|
5320
|
-
return legendItem.classed(
|
|
5409
|
+
return legendItem.classed($LEGEND.legendItemHidden) ? null : "0.3";
|
|
5321
5410
|
},
|
|
5322
5411
|
/**
|
|
5323
5412
|
* Toggles the focus of the legend
|
|
@@ -5329,9 +5418,9 @@ var legend$1 = {
|
|
|
5329
5418
|
var $$ = this;
|
|
5330
5419
|
var legend = $$.$el.legend, $T = $$.$T;
|
|
5331
5420
|
var targetIdz = $$.mapToTargetIds(targetIds);
|
|
5332
|
-
legend && $T(legend.selectAll(".".concat(
|
|
5421
|
+
legend && $T(legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5333
5422
|
.filter(function (id) { return targetIdz.indexOf(id) >= 0; })
|
|
5334
|
-
.classed(
|
|
5423
|
+
.classed($FOCUS.legendItemFocused, focus))
|
|
5335
5424
|
.style("opacity", function () {
|
|
5336
5425
|
return focus ? null :
|
|
5337
5426
|
$$.opacityForUnfocusedLegend.call($$, select(this));
|
|
@@ -5344,8 +5433,8 @@ var legend$1 = {
|
|
|
5344
5433
|
revertLegend: function () {
|
|
5345
5434
|
var $$ = this;
|
|
5346
5435
|
var legend = $$.$el.legend, $T = $$.$T;
|
|
5347
|
-
legend && $T(legend.selectAll(".".concat(
|
|
5348
|
-
.classed(
|
|
5436
|
+
legend && $T(legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5437
|
+
.classed($FOCUS.legendItemFocused, false))
|
|
5349
5438
|
.style("opacity", null);
|
|
5350
5439
|
},
|
|
5351
5440
|
/**
|
|
@@ -5400,7 +5489,7 @@ var legend$1 = {
|
|
|
5400
5489
|
if (id) {
|
|
5401
5490
|
data = (!state.redrawing && cache.get(cacheKey)) || {};
|
|
5402
5491
|
if (!data[id]) {
|
|
5403
|
-
data[id] = $$.getTextRect(textElement,
|
|
5492
|
+
data[id] = $$.getTextRect(textElement, $LEGEND.legendItem);
|
|
5404
5493
|
cache.add(cacheKey, data);
|
|
5405
5494
|
}
|
|
5406
5495
|
data = data[id];
|
|
@@ -5421,7 +5510,7 @@ var legend$1 = {
|
|
|
5421
5510
|
.attr("class", function (id) {
|
|
5422
5511
|
var node = select(this);
|
|
5423
5512
|
var itemClass = (!node.empty() && node.attr("class")) || "";
|
|
5424
|
-
return itemClass + $$.generateClass(
|
|
5513
|
+
return itemClass + $$.generateClass($LEGEND.legendItem, id);
|
|
5425
5514
|
})
|
|
5426
5515
|
.style("visibility", function (id) { return ($$.isLegendToShow(id) ? null : "hidden"); });
|
|
5427
5516
|
if (config.interaction_enabled) {
|
|
@@ -5436,7 +5525,7 @@ var legend$1 = {
|
|
|
5436
5525
|
else {
|
|
5437
5526
|
api.toggle(id);
|
|
5438
5527
|
select(this)
|
|
5439
|
-
.classed(
|
|
5528
|
+
.classed($FOCUS.legendItemFocused, false);
|
|
5440
5529
|
}
|
|
5441
5530
|
}
|
|
5442
5531
|
isTouch && $$.hideTooltip();
|
|
@@ -5444,18 +5533,18 @@ var legend$1 = {
|
|
|
5444
5533
|
!isTouch && item
|
|
5445
5534
|
.on("mouseout", function (event, id) {
|
|
5446
5535
|
if (!callFn(config.legend_item_onout, api, id)) {
|
|
5447
|
-
select(this).classed(
|
|
5536
|
+
select(this).classed($FOCUS.legendItemFocused, false);
|
|
5448
5537
|
if (hasGauge) {
|
|
5449
|
-
$$.undoMarkOverlapped($$, ".".concat(
|
|
5538
|
+
$$.undoMarkOverlapped($$, ".".concat($GAUGE.gaugeValue));
|
|
5450
5539
|
}
|
|
5451
5540
|
$$.api.revert();
|
|
5452
5541
|
}
|
|
5453
5542
|
})
|
|
5454
5543
|
.on("mouseover", function (event, id) {
|
|
5455
5544
|
if (!callFn(config.legend_item_onover, api, id)) {
|
|
5456
|
-
select(this).classed(
|
|
5545
|
+
select(this).classed($FOCUS.legendItemFocused, true);
|
|
5457
5546
|
if (hasGauge) {
|
|
5458
|
-
$$.markOverlapped(id, $$, ".".concat(
|
|
5547
|
+
$$.markOverlapped(id, $$, ".".concat($GAUGE.gaugeValue));
|
|
5459
5548
|
}
|
|
5460
5549
|
if (!state.transiting && $$.isTargetToShow(id)) {
|
|
5461
5550
|
api.focus(id);
|
|
@@ -5583,7 +5672,7 @@ var legend$1 = {
|
|
|
5583
5672
|
var yForLegendTile = function (id, i) { return yForLegend(id, i) + 4; };
|
|
5584
5673
|
var pos = -200;
|
|
5585
5674
|
// Define g for legend area
|
|
5586
|
-
var l = legend.selectAll(".".concat(
|
|
5675
|
+
var l = legend.selectAll(".".concat($LEGEND.legendItem))
|
|
5587
5676
|
.data(targetIdz)
|
|
5588
5677
|
.enter()
|
|
5589
5678
|
.append("g");
|
|
@@ -5597,7 +5686,7 @@ var legend$1 = {
|
|
|
5597
5686
|
.attr("x", isLegendRightOrInset ? xForLegendText : pos)
|
|
5598
5687
|
.attr("y", isLegendRightOrInset ? pos : yForLegendText);
|
|
5599
5688
|
l.append("rect")
|
|
5600
|
-
.attr("class",
|
|
5689
|
+
.attr("class", $LEGEND.legendItemEvent)
|
|
5601
5690
|
.style("fill-opacity", "0")
|
|
5602
5691
|
.attr("x", isLegendRightOrInset ? xForLegendRect : pos)
|
|
5603
5692
|
.attr("y", isLegendRightOrInset ? pos : yForLegendRect);
|
|
@@ -5620,7 +5709,7 @@ var legend$1 = {
|
|
|
5620
5709
|
}
|
|
5621
5710
|
return doc.createElementNS(namespaces.svg, ("hasValidPointType" in $$) && $$.hasValidPointType(point) ? point : "use");
|
|
5622
5711
|
})
|
|
5623
|
-
.attr("class",
|
|
5712
|
+
.attr("class", $LEGEND.legendItemPoint)
|
|
5624
5713
|
.style("fill", getColor)
|
|
5625
5714
|
.style("pointer-events", "none")
|
|
5626
5715
|
.attr("href", function (data, idx, selection) {
|
|
@@ -5632,7 +5721,7 @@ var legend$1 = {
|
|
|
5632
5721
|
}
|
|
5633
5722
|
else {
|
|
5634
5723
|
l.append("line")
|
|
5635
|
-
.attr("class",
|
|
5724
|
+
.attr("class", $LEGEND.legendItemTile)
|
|
5636
5725
|
.style("stroke", getColor)
|
|
5637
5726
|
.style("pointer-events", "none")
|
|
5638
5727
|
.attr("x1", isLegendRightOrInset ? x1ForLegendTile : pos)
|
|
@@ -5642,10 +5731,10 @@ var legend$1 = {
|
|
|
5642
5731
|
.attr("stroke-width", config.legend_item_tile_height);
|
|
5643
5732
|
}
|
|
5644
5733
|
// Set background for inset legend
|
|
5645
|
-
background = legend.select(".".concat(
|
|
5734
|
+
background = legend.select(".".concat($LEGEND.legendBackground, " rect"));
|
|
5646
5735
|
if (state.isLegendInset && maxWidth > 0 && background.size() === 0) {
|
|
5647
|
-
background = legend.insert("g", ".".concat(
|
|
5648
|
-
.attr("class",
|
|
5736
|
+
background = legend.insert("g", ".".concat($LEGEND.legendItem))
|
|
5737
|
+
.attr("class", $LEGEND.legendBackground)
|
|
5649
5738
|
.append("rect");
|
|
5650
5739
|
}
|
|
5651
5740
|
var texts = legend.selectAll("text")
|
|
@@ -5657,7 +5746,7 @@ var legend$1 = {
|
|
|
5657
5746
|
$T(texts, withTransition)
|
|
5658
5747
|
.attr("x", xForLegendText)
|
|
5659
5748
|
.attr("y", yForLegendText);
|
|
5660
|
-
var rects = legend.selectAll("rect.".concat(
|
|
5749
|
+
var rects = legend.selectAll("rect.".concat($LEGEND.legendItemEvent))
|
|
5661
5750
|
.data(targetIdz);
|
|
5662
5751
|
$T(rects, withTransition)
|
|
5663
5752
|
.attr("width", function (id) { return widths[id]; })
|
|
@@ -5665,7 +5754,7 @@ var legend$1 = {
|
|
|
5665
5754
|
.attr("x", xForLegendRect)
|
|
5666
5755
|
.attr("y", yForLegendRect);
|
|
5667
5756
|
if (usePoint) {
|
|
5668
|
-
var tiles = legend.selectAll(".".concat(
|
|
5757
|
+
var tiles = legend.selectAll(".".concat($LEGEND.legendItemPoint))
|
|
5669
5758
|
.data(targetIdz);
|
|
5670
5759
|
$T(tiles, withTransition)
|
|
5671
5760
|
.each(function () {
|
|
@@ -5701,7 +5790,7 @@ var legend$1 = {
|
|
|
5701
5790
|
});
|
|
5702
5791
|
}
|
|
5703
5792
|
else {
|
|
5704
|
-
var tiles = legend.selectAll("line.".concat(
|
|
5793
|
+
var tiles = legend.selectAll("line.".concat($LEGEND.legendItemTile))
|
|
5705
5794
|
.data(targetIdz);
|
|
5706
5795
|
$T(tiles, withTransition)
|
|
5707
5796
|
.style("stroke", getColor)
|
|
@@ -5761,7 +5850,7 @@ var redraw = {
|
|
|
5761
5850
|
// @TODO: Make 'init' state to be accessible everywhere not passing as argument.
|
|
5762
5851
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
5763
5852
|
// Data empty label positioning and text.
|
|
5764
|
-
config.data_empty_label_text && main.select("text.".concat(
|
|
5853
|
+
config.data_empty_label_text && main.select("text.".concat($TEXT.text, ".").concat($COMMON.empty))
|
|
5765
5854
|
.attr("x", state.width / 2)
|
|
5766
5855
|
.attr("y", state.height / 2)
|
|
5767
5856
|
.text(config.data_empty_label_text)
|
|
@@ -5777,7 +5866,7 @@ var redraw = {
|
|
|
5777
5866
|
}
|
|
5778
5867
|
});
|
|
5779
5868
|
// circles for select
|
|
5780
|
-
$el.text && main.selectAll(".".concat(
|
|
5869
|
+
$el.text && main.selectAll(".".concat($SELECT.selectedCircles))
|
|
5781
5870
|
.filter($$.isBarType.bind($$))
|
|
5782
5871
|
.selectAll("circle")
|
|
5783
5872
|
.remove();
|
|
@@ -5922,7 +6011,8 @@ var redraw = {
|
|
|
5922
6011
|
redrawWithoutRescale: function () {
|
|
5923
6012
|
this.redraw({
|
|
5924
6013
|
withY: false,
|
|
5925
|
-
|
|
6014
|
+
withDimension: false,
|
|
6015
|
+
withLegend: false,
|
|
5926
6016
|
withSubchart: false,
|
|
5927
6017
|
withEventRect: false,
|
|
5928
6018
|
withTransitionForAxis: false
|
|
@@ -6162,6 +6252,19 @@ var shape = {
|
|
|
6162
6252
|
}
|
|
6163
6253
|
return shape;
|
|
6164
6254
|
},
|
|
6255
|
+
/**
|
|
6256
|
+
* Get shape's indices according it's position
|
|
6257
|
+
*
|
|
6258
|
+
* From the below example, indices will be:
|
|
6259
|
+
* ==> {data1: 0, data2: 0, data3: 1, data4: 1, __max__: 1}
|
|
6260
|
+
*
|
|
6261
|
+
* data1 data3 data1 data3
|
|
6262
|
+
* data2 data4 data2 data4
|
|
6263
|
+
* -------------------------
|
|
6264
|
+
* 0 1
|
|
6265
|
+
* @param {Function} typeFilter Chart type filter function
|
|
6266
|
+
* @returns {object} Indices object with its position
|
|
6267
|
+
*/
|
|
6165
6268
|
getShapeIndices: function (typeFilter) {
|
|
6166
6269
|
var $$ = this;
|
|
6167
6270
|
var config = $$.config;
|
|
@@ -6201,12 +6304,25 @@ var shape = {
|
|
|
6201
6304
|
/**
|
|
6202
6305
|
* Get indices value based on data ID value
|
|
6203
6306
|
* @param {object} indices Indices object
|
|
6204
|
-
* @param {
|
|
6307
|
+
* @param {object} d Data row
|
|
6308
|
+
* @param {string} caller Caller function name (Used only for 'sparkline' plugin)
|
|
6205
6309
|
* @returns {object} Indices object
|
|
6206
6310
|
* @private
|
|
6207
6311
|
*/
|
|
6208
|
-
getIndices: function (indices,
|
|
6209
|
-
var
|
|
6312
|
+
getIndices: function (indices, d, caller) {
|
|
6313
|
+
var $$ = this;
|
|
6314
|
+
var _a = $$.config, xs = _a.data_xs, removeNull = _a.bar_indices_removeNull;
|
|
6315
|
+
var id = d.id, index = d.index;
|
|
6316
|
+
if ($$.isBarType(id) && removeNull) {
|
|
6317
|
+
var ind_1 = {};
|
|
6318
|
+
// redefine bar indices order
|
|
6319
|
+
$$.getAllValuesOnIndex(index, true)
|
|
6320
|
+
.forEach(function (v, i) {
|
|
6321
|
+
ind_1[v.id] = i;
|
|
6322
|
+
ind_1.__max__ = i;
|
|
6323
|
+
});
|
|
6324
|
+
return ind_1;
|
|
6325
|
+
}
|
|
6210
6326
|
return notEmpty(xs) ?
|
|
6211
6327
|
indices[xs[id]] : indices;
|
|
6212
6328
|
},
|
|
@@ -6231,7 +6347,7 @@ var shape = {
|
|
|
6231
6347
|
var sum = function (p, c) { return p + c; };
|
|
6232
6348
|
var halfWidth = isObjectType(offset) && (offset._$total.length ? offset._$total.reduce(sum) / 2 : 0);
|
|
6233
6349
|
return function (d) {
|
|
6234
|
-
var ind = $$.getIndices(indices, d
|
|
6350
|
+
var ind = $$.getIndices(indices, d, "getShapeX");
|
|
6235
6351
|
var index = d.id in ind ? ind[d.id] : 0;
|
|
6236
6352
|
var targetsNum = (ind.__max__ || 0) + 1;
|
|
6237
6353
|
var x = 0;
|
|
@@ -6290,9 +6406,11 @@ var shape = {
|
|
|
6290
6406
|
*/
|
|
6291
6407
|
getShapeYMin: function (id) {
|
|
6292
6408
|
var $$ = this;
|
|
6293
|
-
var
|
|
6409
|
+
var axisId = $$.axis.getId(id);
|
|
6410
|
+
var scale = $$.scale[axisId];
|
|
6294
6411
|
var yMin = scale.domain()[0];
|
|
6295
|
-
|
|
6412
|
+
var inverted = $$.config["axis_".concat(axisId, "_inverted")];
|
|
6413
|
+
return !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;
|
|
6296
6414
|
},
|
|
6297
6415
|
/**
|
|
6298
6416
|
* Get Shape's offset data
|
|
@@ -6335,7 +6453,7 @@ var shape = {
|
|
|
6335
6453
|
var _a = $$.getShapeOffsetData(typeFilter), shapeOffsetTargets = _a.shapeOffsetTargets, indexMapByTargetId = _a.indexMapByTargetId;
|
|
6336
6454
|
return function (d, idx) {
|
|
6337
6455
|
var id = d.id, value = d.value, x = d.x;
|
|
6338
|
-
var ind = $$.getIndices(indices,
|
|
6456
|
+
var ind = $$.getIndices(indices, d);
|
|
6339
6457
|
var scale = $$.getYScaleById(id, isSub);
|
|
6340
6458
|
if ($$.isBarRangeType(d)) {
|
|
6341
6459
|
// TODO use range.getStart()
|
|
@@ -6631,7 +6749,7 @@ var size = {
|
|
|
6631
6749
|
var $$ = this;
|
|
6632
6750
|
var config = $$.config, $el = $$.$el;
|
|
6633
6751
|
var hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner);
|
|
6634
|
-
var leftAxisClass = config.axis_rotated ?
|
|
6752
|
+
var leftAxisClass = config.axis_rotated ? $AXIS.axisX : $AXIS.axisY;
|
|
6635
6753
|
var leftAxis = $el.main.select(".".concat(leftAxisClass)).node();
|
|
6636
6754
|
var svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 };
|
|
6637
6755
|
var chartRect = $el.chart.node().getBoundingClientRect();
|
|
@@ -6659,7 +6777,7 @@ var size = {
|
|
|
6659
6777
|
.attr("width", current.width)
|
|
6660
6778
|
.attr("height", current.height);
|
|
6661
6779
|
if (hasAxis) {
|
|
6662
|
-
var brush = svg.select(".".concat(
|
|
6780
|
+
var brush = svg.select(".".concat($SUBCHART.brush, " .overlay"));
|
|
6663
6781
|
var brushSize = { width: 0, height: 0 };
|
|
6664
6782
|
if (brush.size()) {
|
|
6665
6783
|
brushSize.width = +brush.attr("width");
|
|
@@ -6812,8 +6930,8 @@ var text = {
|
|
|
6812
6930
|
*/
|
|
6813
6931
|
initText: function () {
|
|
6814
6932
|
var $el = this.$el;
|
|
6815
|
-
$el.main.select(".".concat(
|
|
6816
|
-
.attr("class",
|
|
6933
|
+
$el.main.select(".".concat($COMMON.chart)).append("g")
|
|
6934
|
+
.attr("class", $TEXT.chartTexts);
|
|
6817
6935
|
},
|
|
6818
6936
|
/**
|
|
6819
6937
|
* Update chartText
|
|
@@ -6825,7 +6943,7 @@ var text = {
|
|
|
6825
6943
|
var classChartText = $$.getChartClass("Text");
|
|
6826
6944
|
var classTexts = $$.getClass("texts", "id");
|
|
6827
6945
|
var classFocus = $$.classFocus.bind($$);
|
|
6828
|
-
var mainTextUpdate = $$.$el.main.select(".".concat(
|
|
6946
|
+
var mainTextUpdate = $$.$el.main.select(".".concat($TEXT.chartTexts)).selectAll(".".concat($TEXT.chartText))
|
|
6829
6947
|
.data(targets)
|
|
6830
6948
|
.attr("class", function (d) { return classChartText(d) + classFocus(d); });
|
|
6831
6949
|
var mainTextEnter = mainTextUpdate.enter().append("g")
|
|
@@ -6843,8 +6961,8 @@ var text = {
|
|
|
6843
6961
|
var $$ = this;
|
|
6844
6962
|
var $el = $$.$el, $T = $$.$T, config = $$.config;
|
|
6845
6963
|
var classText = $$.getClass("text", "index");
|
|
6846
|
-
var text = $el.main.selectAll(".".concat(
|
|
6847
|
-
.selectAll(".".concat(
|
|
6964
|
+
var text = $el.main.selectAll(".".concat($TEXT.texts))
|
|
6965
|
+
.selectAll(".".concat($TEXT.text))
|
|
6848
6966
|
.data($$.labelishData.bind($$));
|
|
6849
6967
|
$T(text.exit())
|
|
6850
6968
|
.style("fill-opacity", "0")
|
|
@@ -7198,7 +7316,7 @@ var text = {
|
|
|
7198
7316
|
Math.ceil(nodeForWidth.node().getComputedTextLength());
|
|
7199
7317
|
var overlapsY = Math.ceil(Math.abs(translate.f - coordinate.f)) <
|
|
7200
7318
|
parseInt(textNode.style("font-size"), 10);
|
|
7201
|
-
filteredTextNode.classed(
|
|
7319
|
+
filteredTextNode.classed($TEXT.TextOverlapping, overlapsX && overlapsY);
|
|
7202
7320
|
});
|
|
7203
7321
|
},
|
|
7204
7322
|
/**
|
|
@@ -7212,7 +7330,7 @@ var text = {
|
|
|
7212
7330
|
$$.$el.arcs.selectAll(selector)
|
|
7213
7331
|
.each(function () {
|
|
7214
7332
|
selectAll([this, this.previousSibling])
|
|
7215
|
-
.classed(
|
|
7333
|
+
.classed($TEXT.TextOverlapping, false);
|
|
7216
7334
|
});
|
|
7217
7335
|
},
|
|
7218
7336
|
/**
|
|
@@ -7270,7 +7388,7 @@ var title = {
|
|
|
7270
7388
|
var text = $el.title
|
|
7271
7389
|
.append("text")
|
|
7272
7390
|
.style("text-anchor", getTextPos(config.title_position))
|
|
7273
|
-
.attr("class",
|
|
7391
|
+
.attr("class", $TEXT.title);
|
|
7274
7392
|
setTextValue(text, config.title_text, [0.3, 1.5]);
|
|
7275
7393
|
}
|
|
7276
7394
|
},
|
|
@@ -7300,7 +7418,7 @@ var title = {
|
|
|
7300
7418
|
var $$ = this;
|
|
7301
7419
|
var config = $$.config, current = $$.state.current;
|
|
7302
7420
|
var position = config.title_position || "left";
|
|
7303
|
-
var textRectWidth = $$.getTextRect($$.$el.title,
|
|
7421
|
+
var textRectWidth = $$.getTextRect($$.$el.title, $TEXT.title).width;
|
|
7304
7422
|
var x;
|
|
7305
7423
|
if (/(right|center)/.test(position)) {
|
|
7306
7424
|
x = current.width - textRectWidth;
|
|
@@ -7324,7 +7442,7 @@ var title = {
|
|
|
7324
7442
|
yForTitle: function () {
|
|
7325
7443
|
var $$ = this;
|
|
7326
7444
|
return ($$.config.title_padding.top || 0) +
|
|
7327
|
-
$$.getTextRect($$.$el.title,
|
|
7445
|
+
$$.getTextRect($$.$el.title, $TEXT.title).height;
|
|
7328
7446
|
},
|
|
7329
7447
|
/**
|
|
7330
7448
|
* Get title padding
|
|
@@ -7348,9 +7466,8 @@ var tooltip$1 = {
|
|
|
7348
7466
|
$el.tooltip = select(config.tooltip_contents.bindto);
|
|
7349
7467
|
if ($el.tooltip.empty()) {
|
|
7350
7468
|
$el.tooltip = $el.chart
|
|
7351
|
-
.style("position", "relative")
|
|
7352
7469
|
.append("div")
|
|
7353
|
-
.attr("class",
|
|
7470
|
+
.attr("class", $TOOLTIP.tooltipContainer)
|
|
7354
7471
|
.style("position", "absolute")
|
|
7355
7472
|
.style("pointer-events", "none")
|
|
7356
7473
|
.style("display", "none");
|
|
@@ -7473,12 +7590,12 @@ var tooltip$1 = {
|
|
|
7473
7590
|
var title = (state.hasAxis || state.hasRadar) &&
|
|
7474
7591
|
sanitise(titleFormat ? titleFormat(row.x) : row.x);
|
|
7475
7592
|
text = tplProcess(tpl[0], {
|
|
7476
|
-
CLASS_TOOLTIP:
|
|
7593
|
+
CLASS_TOOLTIP: $TOOLTIP.tooltip,
|
|
7477
7594
|
TITLE: isValue(title) ? (tplStr ? title : "<tr><th colspan=\"2\">".concat(title, "</th></tr>")) : ""
|
|
7478
7595
|
});
|
|
7479
7596
|
}
|
|
7480
7597
|
if (!row.ratio && $$.$el.arcs) {
|
|
7481
|
-
row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path.".concat(
|
|
7598
|
+
row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path.".concat($ARC.arc, "-").concat(row.id)).data()[0]);
|
|
7482
7599
|
}
|
|
7483
7600
|
param = [row.ratio, row.id, row.index, d];
|
|
7484
7601
|
value = sanitise(valueFormat.apply(void 0, __spreadArray([getRowValue(row)], param, false)));
|
|
@@ -7502,7 +7619,7 @@ var tooltip$1 = {
|
|
|
7502
7619
|
var name_1 = sanitise(nameFormat.apply(void 0, __spreadArray([row.name], param, false)));
|
|
7503
7620
|
var color_1 = getBgColor(row);
|
|
7504
7621
|
var contentValue_1 = {
|
|
7505
|
-
CLASS_TOOLTIP_NAME:
|
|
7622
|
+
CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
|
|
7506
7623
|
COLOR: (tplStr || !$$.patterns) ? color_1 : "<svg><rect style=\"fill:".concat(color_1, "\" width=\"10\" height=\"10\"></rect></svg>"),
|
|
7507
7624
|
NAME: name_1,
|
|
7508
7625
|
VALUE: value
|
|
@@ -7779,19 +7896,19 @@ var transform = {
|
|
|
7779
7896
|
var main = $$.$el.main, $T = $$.$T;
|
|
7780
7897
|
var xAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisX) ?
|
|
7781
7898
|
transitions.axisX :
|
|
7782
|
-
$T(main.select(".".concat(
|
|
7899
|
+
$T(main.select(".".concat($AXIS.axisX)), withTransition);
|
|
7783
7900
|
var yAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY) ?
|
|
7784
7901
|
transitions.axisY :
|
|
7785
|
-
$T(main.select(".".concat(
|
|
7902
|
+
$T(main.select(".".concat($AXIS.axisY)), withTransition);
|
|
7786
7903
|
var y2Axis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY2) ?
|
|
7787
7904
|
transitions.axisY2 :
|
|
7788
|
-
$T(main.select(".".concat(
|
|
7905
|
+
$T(main.select(".".concat($AXIS.axisY2)), withTransition);
|
|
7789
7906
|
$T(main, withTransition)
|
|
7790
7907
|
.attr("transform", $$.getTranslate("main"));
|
|
7791
7908
|
xAxis.attr("transform", $$.getTranslate("x"));
|
|
7792
7909
|
yAxis.attr("transform", $$.getTranslate("y"));
|
|
7793
7910
|
y2Axis.attr("transform", $$.getTranslate("y2"));
|
|
7794
|
-
main.select(".".concat(
|
|
7911
|
+
main.select(".".concat($ARC.chartArcs))
|
|
7795
7912
|
.attr("transform", $$.getTranslate("arc"));
|
|
7796
7913
|
},
|
|
7797
7914
|
transformAll: function (withTransition, transitions) {
|
|
@@ -8158,7 +8275,9 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8158
8275
|
if ($el.chart.empty()) {
|
|
8159
8276
|
$el.chart = select(doc.body.appendChild(doc.createElement("div")));
|
|
8160
8277
|
}
|
|
8161
|
-
$el.chart.html("")
|
|
8278
|
+
$el.chart.html("")
|
|
8279
|
+
.classed(bindto.classname, true)
|
|
8280
|
+
.style("position", "relative");
|
|
8162
8281
|
$$.initToRender();
|
|
8163
8282
|
};
|
|
8164
8283
|
/**
|
|
@@ -8308,7 +8427,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8308
8427
|
$$.bindResize();
|
|
8309
8428
|
// Define regions
|
|
8310
8429
|
var main = $el.svg.append("g")
|
|
8311
|
-
.classed(
|
|
8430
|
+
.classed($COMMON.main, true)
|
|
8312
8431
|
.attr("transform", $$.getTranslate("main"));
|
|
8313
8432
|
$el.main = main;
|
|
8314
8433
|
// initialize subchart when subchart show option is set
|
|
@@ -8320,7 +8439,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8320
8439
|
// text when empty
|
|
8321
8440
|
if (config.data_empty_label_text) {
|
|
8322
8441
|
main.append("text")
|
|
8323
|
-
.attr("class", "".concat(
|
|
8442
|
+
.attr("class", "".concat($TEXT.text, " ").concat($COMMON.empty))
|
|
8324
8443
|
.attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
|
|
8325
8444
|
.attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
|
|
8326
8445
|
}
|
|
@@ -8331,7 +8450,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8331
8450
|
!config.clipPath && $$.axis.init();
|
|
8332
8451
|
}
|
|
8333
8452
|
// Define g for chart area
|
|
8334
|
-
main.append("g").attr("class",
|
|
8453
|
+
main.append("g").attr("class", $COMMON.chart)
|
|
8335
8454
|
.attr("clip-path", state.clip.path);
|
|
8336
8455
|
$$.callPluginHook("$init");
|
|
8337
8456
|
if (hasAxis) {
|
|
@@ -8490,7 +8609,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
8490
8609
|
ChartInternal.prototype.showTargets = function () {
|
|
8491
8610
|
var $$ = this;
|
|
8492
8611
|
var svg = $$.$el.svg, $T = $$.$T;
|
|
8493
|
-
$T(svg.selectAll(".".concat(
|
|
8612
|
+
$T(svg.selectAll(".".concat($COMMON.target))
|
|
8494
8613
|
.filter(function (d) { return $$.isTargetToShow(d.id); })).style("opacity", null);
|
|
8495
8614
|
};
|
|
8496
8615
|
ChartInternal.prototype.getWithOption = function (options) {
|
|
@@ -8653,7 +8772,7 @@ var apiChart = {
|
|
|
8653
8772
|
config.size_width = size ? size.width : null;
|
|
8654
8773
|
config.size_height = size ? size.height : null;
|
|
8655
8774
|
state.resizing = true;
|
|
8656
|
-
this.flush(false
|
|
8775
|
+
this.flush(false);
|
|
8657
8776
|
$$.resizeFunction();
|
|
8658
8777
|
}
|
|
8659
8778
|
},
|
|
@@ -8724,11 +8843,16 @@ var apiChart = {
|
|
|
8724
8843
|
if (notEmpty($$)) {
|
|
8725
8844
|
$$.callPluginHook("$willDestroy");
|
|
8726
8845
|
$$.charts.splice($$.charts.indexOf(this), 1);
|
|
8846
|
+
// detach events
|
|
8847
|
+
$$.unbindAllEvents();
|
|
8727
8848
|
// clear timers && pending transition
|
|
8728
8849
|
svg.select("*").interrupt();
|
|
8729
8850
|
$$.resizeFunction.clear();
|
|
8730
8851
|
win.removeEventListener("resize", $$.resizeFunction);
|
|
8731
|
-
chart.classed("bb", false)
|
|
8852
|
+
chart.classed("bb", false)
|
|
8853
|
+
.style("position", null)
|
|
8854
|
+
.selectChildren()
|
|
8855
|
+
.remove();
|
|
8732
8856
|
// releasing own references
|
|
8733
8857
|
Object.keys(this).forEach(function (key) {
|
|
8734
8858
|
key === "internal" && Object.keys($$).forEach(function (k) {
|
|
@@ -9115,11 +9239,11 @@ var apiFocus = {
|
|
|
9115
9239
|
var candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
|
|
9116
9240
|
this.revert();
|
|
9117
9241
|
this.defocus();
|
|
9118
|
-
candidates.classed(
|
|
9242
|
+
candidates.classed($FOCUS.focused, true).classed($FOCUS.defocused, false);
|
|
9119
9243
|
if ($$.hasArcType() && !state.hasRadar) {
|
|
9120
9244
|
$$.expandArc(targetIds);
|
|
9121
9245
|
$$.hasType("gauge") &&
|
|
9122
|
-
$$.markOverlapped(targetIdsValue, $$, ".".concat(
|
|
9246
|
+
$$.markOverlapped(targetIdsValue, $$, ".".concat($GAUGE.gaugeValue));
|
|
9123
9247
|
}
|
|
9124
9248
|
$$.toggleFocusLegend(targetIds, true);
|
|
9125
9249
|
state.focusedTargetIds = targetIds;
|
|
@@ -9147,11 +9271,11 @@ var apiFocus = {
|
|
|
9147
9271
|
var state = $$.state;
|
|
9148
9272
|
var targetIds = $$.mapToTargetIds(targetIdsValue);
|
|
9149
9273
|
var candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
|
|
9150
|
-
candidates.classed(
|
|
9274
|
+
candidates.classed($FOCUS.focused, false).classed($FOCUS.defocused, true);
|
|
9151
9275
|
if ($$.hasArcType()) {
|
|
9152
9276
|
$$.unexpandArc(targetIds);
|
|
9153
9277
|
$$.hasType("gauge") &&
|
|
9154
|
-
$$.undoMarkOverlapped($$, ".".concat(
|
|
9278
|
+
$$.undoMarkOverlapped($$, ".".concat($GAUGE.gaugeValue));
|
|
9155
9279
|
}
|
|
9156
9280
|
$$.toggleFocusLegend(targetIds, false);
|
|
9157
9281
|
state.focusedTargetIds = state.focusedTargetIds.filter(function (id) { return targetIds.indexOf(id) < 0; });
|
|
@@ -9179,15 +9303,15 @@ var apiFocus = {
|
|
|
9179
9303
|
var config = $$.config, state = $$.state, $el = $$.$el;
|
|
9180
9304
|
var targetIds = $$.mapToTargetIds(targetIdsValue);
|
|
9181
9305
|
var candidates = $el.svg.selectAll($$.selectorTargets(targetIds)); // should be for all targets
|
|
9182
|
-
candidates.classed(
|
|
9306
|
+
candidates.classed($FOCUS.focused, false).classed($FOCUS.defocused, false);
|
|
9183
9307
|
$$.hasArcType() && $$.unexpandArc(targetIds);
|
|
9184
9308
|
if (config.legend_show) {
|
|
9185
9309
|
$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
|
|
9186
9310
|
$el.legend.selectAll($$.selectorLegends(targetIds))
|
|
9187
9311
|
.filter(function () {
|
|
9188
|
-
return select(this).classed(
|
|
9312
|
+
return select(this).classed($FOCUS.legendItemFocused);
|
|
9189
9313
|
})
|
|
9190
|
-
.classed(
|
|
9314
|
+
.classed($FOCUS.legendItemFocused, false);
|
|
9191
9315
|
}
|
|
9192
9316
|
state.focusedTargetIds = [];
|
|
9193
9317
|
state.defocusedTargetIds = [];
|
|
@@ -10325,8 +10449,8 @@ extend(regions, {
|
|
|
10325
10449
|
var $$ = this.internal;
|
|
10326
10450
|
var config = $$.config, $T = $$.$T;
|
|
10327
10451
|
var options = optionsValue || {};
|
|
10328
|
-
var classes = getOption(options, "classes", [
|
|
10329
|
-
var regions = $$.$el.main.select(".".concat(
|
|
10452
|
+
var classes = getOption(options, "classes", [$REGION.region]);
|
|
10453
|
+
var regions = $$.$el.main.select(".".concat($REGION.regions))
|
|
10330
10454
|
.selectAll(classes.map(function (c) { return ".".concat(c); }));
|
|
10331
10455
|
$T(regions)
|
|
10332
10456
|
.style("opacity", "0")
|
|
@@ -11200,7 +11324,7 @@ var Axis = /** @class */ (function () {
|
|
|
11200
11324
|
this.setOrient();
|
|
11201
11325
|
}
|
|
11202
11326
|
Axis.prototype.getAxisClassName = function (id) {
|
|
11203
|
-
return "".concat(
|
|
11327
|
+
return "".concat($AXIS.axis, " ").concat($AXIS["axis".concat(capitalize(id))]);
|
|
11204
11328
|
};
|
|
11205
11329
|
Axis.prototype.isHorizontal = function ($$, forHorizontal) {
|
|
11206
11330
|
var isRotated = $$.config.axis_rotated;
|
|
@@ -11245,7 +11369,7 @@ var Axis = /** @class */ (function () {
|
|
|
11245
11369
|
config.axis_y2_show && target.push("y2");
|
|
11246
11370
|
target.forEach(function (v) {
|
|
11247
11371
|
var classAxis = _this.getAxisClassName(v);
|
|
11248
|
-
var classLabel =
|
|
11372
|
+
var classLabel = $AXIS["axis".concat(v.toUpperCase(), "Label")];
|
|
11249
11373
|
axis[v] = main.append("g")
|
|
11250
11374
|
.attr("class", classAxis)
|
|
11251
11375
|
.attr("clip-path", function () {
|
|
@@ -11324,7 +11448,7 @@ var Axis = /** @class */ (function () {
|
|
|
11324
11448
|
Axis.prototype.updateAxes = function () {
|
|
11325
11449
|
var _this = this;
|
|
11326
11450
|
var $$ = this.owner;
|
|
11327
|
-
var config = $$.config, main = $$.$el.main;
|
|
11451
|
+
var config = $$.config, main = $$.$el.main, $T = $$.$T;
|
|
11328
11452
|
Object.keys(this.axesList).forEach(function (id) {
|
|
11329
11453
|
var axesConfig = config["axis_".concat(id, "_axes")];
|
|
11330
11454
|
var scale = $$.scale[id].copy();
|
|
@@ -11346,7 +11470,7 @@ var Axis = /** @class */ (function () {
|
|
|
11346
11470
|
}
|
|
11347
11471
|
else {
|
|
11348
11472
|
axesConfig[i].domain && scale.domain(axesConfig[i].domain);
|
|
11349
|
-
|
|
11473
|
+
$T(g).call(v.scale(scale));
|
|
11350
11474
|
}
|
|
11351
11475
|
g.attr("transform", $$.getTranslate(id, i + 1));
|
|
11352
11476
|
});
|
|
@@ -11750,9 +11874,9 @@ var Axis = /** @class */ (function () {
|
|
|
11750
11874
|
var $$ = this.owner;
|
|
11751
11875
|
var main = $$.$el.main, $T = $$.$T;
|
|
11752
11876
|
var labels = {
|
|
11753
|
-
x: main.select(".".concat(
|
|
11754
|
-
y: main.select(".".concat(
|
|
11755
|
-
y2: main.select(".".concat(
|
|
11877
|
+
x: main.select(".".concat($AXIS.axisX, " .").concat($AXIS.axisXLabel)),
|
|
11878
|
+
y: main.select(".".concat($AXIS.axisY, " .").concat($AXIS.axisYLabel)),
|
|
11879
|
+
y2: main.select(".".concat($AXIS.axisY2, " .").concat($AXIS.axisY2Label))
|
|
11756
11880
|
};
|
|
11757
11881
|
Object.keys(labels).filter(function (id) { return !labels[id].empty(); })
|
|
11758
11882
|
.forEach(function (v) {
|
|
@@ -11872,10 +11996,11 @@ var Axis = /** @class */ (function () {
|
|
|
11872
11996
|
xDomainForZoom = scale.x.orgDomain();
|
|
11873
11997
|
}
|
|
11874
11998
|
["y", "y2"].forEach(function (key) {
|
|
11999
|
+
var prefix = "axis_".concat(key, "_");
|
|
11875
12000
|
var axisScale = scale[key];
|
|
11876
|
-
if (axisScale) {
|
|
11877
|
-
var tickValues = config["
|
|
11878
|
-
var tickCount = config["
|
|
12001
|
+
if (config["".concat(prefix, "show")] && axisScale) {
|
|
12002
|
+
var tickValues = config["".concat(prefix, "tick_values")];
|
|
12003
|
+
var tickCount = config["".concat(prefix, "tick_count")];
|
|
11879
12004
|
axisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));
|
|
11880
12005
|
if (!tickValues && tickCount) {
|
|
11881
12006
|
var axis = $$.axis[key];
|
|
@@ -11909,12 +12034,14 @@ var Axis = /** @class */ (function () {
|
|
|
11909
12034
|
var axis = $el.axis[type];
|
|
11910
12035
|
// subchart x axis should be aligned with x axis culling
|
|
11911
12036
|
var id = type === "subX" ? "x" : type;
|
|
11912
|
-
var
|
|
12037
|
+
var cullingOptionPrefix = "axis_".concat(id, "_tick_culling");
|
|
12038
|
+
var toCull = config[cullingOptionPrefix];
|
|
11913
12039
|
if (axis && toCull) {
|
|
11914
|
-
var
|
|
11915
|
-
var tickValues_1 = sortValue(
|
|
12040
|
+
var tickNodes = axis.selectAll(".tick");
|
|
12041
|
+
var tickValues_1 = sortValue(tickNodes.data());
|
|
11916
12042
|
var tickSize = tickValues_1.length;
|
|
11917
|
-
var cullingMax = config["
|
|
12043
|
+
var cullingMax = config["".concat(cullingOptionPrefix, "_max")];
|
|
12044
|
+
var lines_1 = config["".concat(cullingOptionPrefix, "_lines")];
|
|
11918
12045
|
var intervalForCulling_1;
|
|
11919
12046
|
if (tickSize) {
|
|
11920
12047
|
for (var i = 1; i < tickSize; i++) {
|
|
@@ -11923,17 +12050,20 @@ var Axis = /** @class */ (function () {
|
|
|
11923
12050
|
break;
|
|
11924
12051
|
}
|
|
11925
12052
|
}
|
|
11926
|
-
|
|
11927
|
-
|
|
12053
|
+
tickNodes.each(function (d) {
|
|
12054
|
+
if (tickValues_1.indexOf(d) % intervalForCulling_1) {
|
|
12055
|
+
(lines_1 ? this.querySelector("text") : this)
|
|
12056
|
+
.style.display = "none";
|
|
12057
|
+
}
|
|
11928
12058
|
});
|
|
11929
12059
|
}
|
|
11930
12060
|
else {
|
|
11931
|
-
|
|
12061
|
+
tickNodes.style("display", null);
|
|
11932
12062
|
}
|
|
11933
12063
|
// set/unset x_axis_tick_clippath
|
|
11934
12064
|
if (type === "x") {
|
|
11935
12065
|
var clipPath = current.maxTickWidths.x.clipPath ? clip.pathXAxisTickTexts : null;
|
|
11936
|
-
$el.svg.selectAll(".".concat(
|
|
12066
|
+
$el.svg.selectAll(".".concat($AXIS.axisX, " .tick text"))
|
|
11937
12067
|
.attr("clip-path", clipPath);
|
|
11938
12068
|
}
|
|
11939
12069
|
}
|
|
@@ -11954,9 +12084,9 @@ var eventrect = {
|
|
|
11954
12084
|
*/
|
|
11955
12085
|
initEventRect: function () {
|
|
11956
12086
|
var $$ = this;
|
|
11957
|
-
$$.$el.main.select(".".concat(
|
|
12087
|
+
$$.$el.main.select(".".concat($COMMON.chart))
|
|
11958
12088
|
.append("g")
|
|
11959
|
-
.attr("class",
|
|
12089
|
+
.attr("class", $EVENT.eventRects)
|
|
11960
12090
|
.style("fill-opacity", "0");
|
|
11961
12091
|
},
|
|
11962
12092
|
/**
|
|
@@ -11972,12 +12102,12 @@ var eventrect = {
|
|
|
11972
12102
|
$$.updateEventRect($el.eventRect, true);
|
|
11973
12103
|
}
|
|
11974
12104
|
else {
|
|
11975
|
-
var eventRects = $$.$el.main.select(".".concat(
|
|
12105
|
+
var eventRects = $$.$el.main.select(".".concat($EVENT.eventRects))
|
|
11976
12106
|
.style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? (config.axis_rotated ? "ns-resize" : "ew-resize") : null)
|
|
11977
|
-
.classed(
|
|
11978
|
-
.classed(
|
|
12107
|
+
.classed($EVENT.eventRectsMultiple, isMultipleX)
|
|
12108
|
+
.classed($EVENT.eventRectsSingle, !isMultipleX);
|
|
11979
12109
|
// append event <rect>
|
|
11980
|
-
var eventRectUpdate = eventRects.selectAll(".".concat(
|
|
12110
|
+
var eventRectUpdate = eventRects.selectAll(".".concat($EVENT.eventRect))
|
|
11981
12111
|
.data([0])
|
|
11982
12112
|
.enter()
|
|
11983
12113
|
.append("rect");
|
|
@@ -12058,7 +12188,7 @@ var eventrect = {
|
|
|
12058
12188
|
})
|
|
12059
12189
|
.on("touchstart.eventRect touchmove.eventRect", function (event) {
|
|
12060
12190
|
state.event = event;
|
|
12061
|
-
if (!eventRect.empty() && eventRect.classed(
|
|
12191
|
+
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
12062
12192
|
// if touch points are > 1, means doing zooming interaction. In this case do not execute tooltip codes.
|
|
12063
12193
|
if (state.dragging || state.flowing || $$.hasArcType() || event.touches.length > 1) {
|
|
12064
12194
|
return;
|
|
@@ -12072,7 +12202,7 @@ var eventrect = {
|
|
|
12072
12202
|
}, true)
|
|
12073
12203
|
.on("touchend.eventRect", function (event) {
|
|
12074
12204
|
state.event = event;
|
|
12075
|
-
if (!eventRect.empty() && eventRect.classed(
|
|
12205
|
+
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
12076
12206
|
if ($$.hasArcType() || !$$.toggleShape || state.cancelClick) {
|
|
12077
12207
|
state.cancelClick && (state.cancelClick = false);
|
|
12078
12208
|
}
|
|
@@ -12109,7 +12239,7 @@ var eventrect = {
|
|
|
12109
12239
|
.attr("height", height);
|
|
12110
12240
|
// only for init
|
|
12111
12241
|
if (!rendered) {
|
|
12112
|
-
rectElement.attr("class",
|
|
12242
|
+
rectElement.attr("class", $EVENT.eventRect);
|
|
12113
12243
|
}
|
|
12114
12244
|
}
|
|
12115
12245
|
updateClientRect();
|
|
@@ -12221,7 +12351,7 @@ var eventrect = {
|
|
|
12221
12351
|
$$.showGridFocus(selectedData);
|
|
12222
12352
|
// Show cursor as pointer if point is close to mouse position
|
|
12223
12353
|
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
|
|
12224
|
-
$$.$el.svg.select(".".concat(
|
|
12354
|
+
$$.$el.svg.select(".".concat($EVENT.eventRect)).style("cursor", "pointer");
|
|
12225
12355
|
if (!state.mouseover) {
|
|
12226
12356
|
config.data_onover.call($$.api, closest);
|
|
12227
12357
|
state.mouseover = closest;
|
|
@@ -12235,7 +12365,7 @@ var eventrect = {
|
|
|
12235
12365
|
unselectRect: function () {
|
|
12236
12366
|
var $$ = this;
|
|
12237
12367
|
var config = $$.config, _a = $$.$el, circle = _a.circle, tooltip = _a.tooltip;
|
|
12238
|
-
$$.$el.svg.select(".".concat(
|
|
12368
|
+
$$.$el.svg.select(".".concat($EVENT.eventRect)).style("cursor", null);
|
|
12239
12369
|
$$.hideGridFocus();
|
|
12240
12370
|
if (tooltip) {
|
|
12241
12371
|
$$.hideTooltip();
|
|
@@ -12247,8 +12377,8 @@ var eventrect = {
|
|
|
12247
12377
|
/**
|
|
12248
12378
|
* Create eventRect for each data on the x-axis.
|
|
12249
12379
|
* Register touch and drag events.
|
|
12250
|
-
* @param {object} eventRectEnter d3.select(
|
|
12251
|
-
* @returns {object} d3.select(
|
|
12380
|
+
* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
|
|
12381
|
+
* @returns {object} d3.select($EVENT.eventRects) object.
|
|
12252
12382
|
* @private
|
|
12253
12383
|
*/
|
|
12254
12384
|
generateEventRectsForSingleX: function (eventRectEnter) {
|
|
@@ -12331,7 +12461,7 @@ var eventrect = {
|
|
|
12331
12461
|
return;
|
|
12332
12462
|
}
|
|
12333
12463
|
var index = d.index;
|
|
12334
|
-
main.selectAll(".".concat(
|
|
12464
|
+
main.selectAll(".".concat($SHAPE.shape, "-").concat(index))
|
|
12335
12465
|
.each(function (d2) {
|
|
12336
12466
|
var _a;
|
|
12337
12467
|
if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
|
|
@@ -12343,7 +12473,7 @@ var eventrect = {
|
|
|
12343
12473
|
/**
|
|
12344
12474
|
* Create an eventRect,
|
|
12345
12475
|
* Register touch and drag events.
|
|
12346
|
-
* @param {object} eventRectEnter d3.select(
|
|
12476
|
+
* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
|
|
12347
12477
|
* @private
|
|
12348
12478
|
*/
|
|
12349
12479
|
generateEventRectsForMultipleXs: function (eventRectEnter) {
|
|
@@ -12384,8 +12514,8 @@ var eventrect = {
|
|
|
12384
12514
|
}
|
|
12385
12515
|
// select if selection enabled
|
|
12386
12516
|
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
|
|
12387
|
-
$$.$el.main.selectAll(".".concat(
|
|
12388
|
-
.selectAll(".".concat(
|
|
12517
|
+
$$.$el.main.selectAll(".".concat($SHAPE.shapes).concat($$.getTargetSelectorSuffix(closest.id)))
|
|
12518
|
+
.selectAll(".".concat($SHAPE.shape, "-").concat(closest.index))
|
|
12389
12519
|
.each(function () {
|
|
12390
12520
|
var _a;
|
|
12391
12521
|
if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
|
|
@@ -12780,11 +12910,11 @@ var grid = {
|
|
|
12780
12910
|
var $$ = this;
|
|
12781
12911
|
var config = $$.config, clip = $$.state.clip, $el = $$.$el;
|
|
12782
12912
|
if (config.grid_x_lines.length || config.grid_y_lines.length) {
|
|
12783
|
-
$el.gridLines.main = $el.main.insert("g", ".".concat(
|
|
12913
|
+
$el.gridLines.main = $el.main.insert("g", ".".concat($COMMON.chart).concat(config.grid_lines_front ? " + *" : ""))
|
|
12784
12914
|
.attr("clip-path", clip.pathGrid)
|
|
12785
|
-
.attr("class", "".concat(
|
|
12786
|
-
$el.gridLines.main.append("g").attr("class",
|
|
12787
|
-
$el.gridLines.main.append("g").attr("class",
|
|
12915
|
+
.attr("class", "".concat($GRID.grid, " ").concat($GRID.gridLines));
|
|
12916
|
+
$el.gridLines.main.append("g").attr("class", $GRID.xgridLines);
|
|
12917
|
+
$el.gridLines.main.append("g").attr("class", $GRID.ygridLines);
|
|
12788
12918
|
$el.gridLines.x = selectAll([]);
|
|
12789
12919
|
}
|
|
12790
12920
|
},
|
|
@@ -12806,13 +12936,13 @@ var grid = {
|
|
|
12806
12936
|
"y1": 0,
|
|
12807
12937
|
"y2": state.height
|
|
12808
12938
|
};
|
|
12809
|
-
grid.x = main.select(".".concat(
|
|
12810
|
-
.selectAll(".".concat(
|
|
12939
|
+
grid.x = main.select(".".concat($GRID.xgrids))
|
|
12940
|
+
.selectAll(".".concat($GRID.xgrid))
|
|
12811
12941
|
.data(xgridData);
|
|
12812
12942
|
grid.x.exit().remove();
|
|
12813
12943
|
grid.x = grid.x.enter()
|
|
12814
12944
|
.append("line")
|
|
12815
|
-
.attr("class",
|
|
12945
|
+
.attr("class", $GRID.xgrid)
|
|
12816
12946
|
.merge(grid.x);
|
|
12817
12947
|
if (!withoutUpdate) {
|
|
12818
12948
|
grid.x.each(function () {
|
|
@@ -12831,14 +12961,14 @@ var grid = {
|
|
|
12831
12961
|
var isRotated = config.axis_rotated;
|
|
12832
12962
|
var gridValues = $$.axis.y.tickValues() || $$.scale.y.ticks(config.grid_y_ticks);
|
|
12833
12963
|
var pos = function (d) { return Math.ceil($$.scale.y(d)); };
|
|
12834
|
-
grid.y = main.select(".".concat(
|
|
12835
|
-
.selectAll(".".concat(
|
|
12964
|
+
grid.y = main.select(".".concat($GRID.ygrids))
|
|
12965
|
+
.selectAll(".".concat($GRID.ygrid))
|
|
12836
12966
|
.data(gridValues);
|
|
12837
12967
|
grid.y.exit().remove();
|
|
12838
12968
|
grid.y = grid.y
|
|
12839
12969
|
.enter()
|
|
12840
12970
|
.append("line")
|
|
12841
|
-
.attr("class",
|
|
12971
|
+
.attr("class", $GRID.ygrid)
|
|
12842
12972
|
.merge(grid.y);
|
|
12843
12973
|
grid.y.attr("x1", isRotated ? pos : 0)
|
|
12844
12974
|
.attr("x2", isRotated ? pos : state.width)
|
|
@@ -12865,8 +12995,8 @@ var grid = {
|
|
|
12865
12995
|
var config = $$.config, _a = $$.$el, gridLines = _a.gridLines, main = _a.main, $T = $$.$T;
|
|
12866
12996
|
var isRotated = config.axis_rotated;
|
|
12867
12997
|
config.grid_x_show && $$.updateXGrid();
|
|
12868
|
-
var xLines = main.select(".".concat(
|
|
12869
|
-
.selectAll(".".concat(
|
|
12998
|
+
var xLines = main.select(".".concat($GRID.xgridLines))
|
|
12999
|
+
.selectAll(".".concat($GRID.xgridLine))
|
|
12870
13000
|
.data(config.grid_x_lines);
|
|
12871
13001
|
// exit
|
|
12872
13002
|
$T(xLines.exit())
|
|
@@ -12882,7 +13012,7 @@ var grid = {
|
|
|
12882
13012
|
.style("opacity", "0");
|
|
12883
13013
|
xLines = xgridLine.merge(xLines);
|
|
12884
13014
|
$T(xLines
|
|
12885
|
-
.attr("class", function (d) { return "".concat(
|
|
13015
|
+
.attr("class", function (d) { return "".concat($GRID.xgridLine, " ").concat(d["class"] || "").trim(); })
|
|
12886
13016
|
.select("text")
|
|
12887
13017
|
.attr("text-anchor", getGridTextAnchor)
|
|
12888
13018
|
.attr("dx", getGridTextDx))
|
|
@@ -12899,8 +13029,8 @@ var grid = {
|
|
|
12899
13029
|
var config = $$.config, _a = $$.state, width = _a.width, height = _a.height, $el = $$.$el, $T = $$.$T;
|
|
12900
13030
|
var isRotated = config.axis_rotated;
|
|
12901
13031
|
config.grid_y_show && $$.updateYGrid();
|
|
12902
|
-
var ygridLines = $el.main.select(".".concat(
|
|
12903
|
-
.selectAll(".".concat(
|
|
13032
|
+
var ygridLines = $el.main.select(".".concat($GRID.ygridLines))
|
|
13033
|
+
.selectAll(".".concat($GRID.ygridLine))
|
|
12904
13034
|
.data(config.grid_y_lines);
|
|
12905
13035
|
// exit
|
|
12906
13036
|
$T(ygridLines.exit())
|
|
@@ -12917,7 +13047,7 @@ var grid = {
|
|
|
12917
13047
|
// update
|
|
12918
13048
|
var yv = $$.yv.bind($$);
|
|
12919
13049
|
$T(ygridLines
|
|
12920
|
-
.attr("class", function (d) { return "".concat(
|
|
13050
|
+
.attr("class", function (d) { return "".concat($GRID.ygridLine, " ").concat(d["class"] || "").trim(); })
|
|
12921
13051
|
.select("line"))
|
|
12922
13052
|
.attr("x1", isRotated ? yv : 0)
|
|
12923
13053
|
.attr("x2", isRotated ? yv : width)
|
|
@@ -12958,26 +13088,26 @@ var grid = {
|
|
|
12958
13088
|
var $$ = this;
|
|
12959
13089
|
var config = $$.config, clip = $$.state.clip, $el = $$.$el;
|
|
12960
13090
|
var isFront = config.grid_front;
|
|
12961
|
-
var className = ".".concat(
|
|
13091
|
+
var className = ".".concat(isFront && $el.gridLines.main ? $GRID.gridLines : $COMMON.chart).concat(isFront ? " + *" : "");
|
|
12962
13092
|
var grid = $el.main.insert("g", className)
|
|
12963
13093
|
.attr("clip-path", clip.pathGrid)
|
|
12964
|
-
.attr("class",
|
|
13094
|
+
.attr("class", $GRID.grid);
|
|
12965
13095
|
$el.grid.main = grid;
|
|
12966
13096
|
config.grid_x_show &&
|
|
12967
|
-
grid.append("g").attr("class",
|
|
13097
|
+
grid.append("g").attr("class", $GRID.xgrids);
|
|
12968
13098
|
config.grid_y_show &&
|
|
12969
|
-
grid.append("g").attr("class",
|
|
13099
|
+
grid.append("g").attr("class", $GRID.ygrids);
|
|
12970
13100
|
if (config.interaction_enabled && config.grid_focus_show) {
|
|
12971
13101
|
grid.append("g")
|
|
12972
|
-
.attr("class",
|
|
13102
|
+
.attr("class", $FOCUS.xgridFocus)
|
|
12973
13103
|
.append("line")
|
|
12974
|
-
.attr("class",
|
|
13104
|
+
.attr("class", $FOCUS.xgridFocus);
|
|
12975
13105
|
// to show xy focus grid line, should be 'tooltip.grouped=false'
|
|
12976
13106
|
if (config.grid_focus_y && !config.tooltip_grouped) {
|
|
12977
13107
|
grid.append("g")
|
|
12978
|
-
.attr("class",
|
|
13108
|
+
.attr("class", $FOCUS.ygridFocus)
|
|
12979
13109
|
.append("line")
|
|
12980
|
-
.attr("class",
|
|
13110
|
+
.attr("class", $FOCUS.ygridFocus);
|
|
12981
13111
|
}
|
|
12982
13112
|
}
|
|
12983
13113
|
},
|
|
@@ -12991,7 +13121,7 @@ var grid = {
|
|
|
12991
13121
|
var $$ = this;
|
|
12992
13122
|
var config = $$.config, _b = $$.state, width = _b.width, height = _b.height;
|
|
12993
13123
|
var isRotated = config.axis_rotated;
|
|
12994
|
-
var focusEl = $$.$el.main.selectAll("line.".concat(
|
|
13124
|
+
var focusEl = $$.$el.main.selectAll("line.".concat($FOCUS.xgridFocus, ", line.").concat($FOCUS.ygridFocus));
|
|
12995
13125
|
var dataToShow = (data || [focusEl.datum()]).filter(function (d) { return d && isValue($$.getBaseValue(d)); });
|
|
12996
13126
|
// Hide when bubble/scatter/stanford plot exists
|
|
12997
13127
|
if (!config.tooltip_show || dataToShow.length === 0 || $$.hasType("bubble") || $$.hasArcType()) {
|
|
@@ -13009,7 +13139,7 @@ var grid = {
|
|
|
13009
13139
|
y: $$.getYScaleById(d.id)(d.value)
|
|
13010
13140
|
};
|
|
13011
13141
|
var xy;
|
|
13012
|
-
if (el.classed(
|
|
13142
|
+
if (el.classed($FOCUS.xgridFocus)) {
|
|
13013
13143
|
// will contain 'x1, y1, x2, y2' order
|
|
13014
13144
|
xy = isRotated ?
|
|
13015
13145
|
[
|
|
@@ -13050,7 +13180,7 @@ var grid = {
|
|
|
13050
13180
|
var $$ = this;
|
|
13051
13181
|
var _b = $$.state, inputType = _b.inputType, resizing = _b.resizing, main = $$.$el.main;
|
|
13052
13182
|
if (inputType === "mouse" || !resizing) {
|
|
13053
|
-
main.selectAll("line.".concat(
|
|
13183
|
+
main.selectAll("line.".concat($FOCUS.xgridFocus, ", line.").concat($FOCUS.ygridFocus))
|
|
13054
13184
|
.style("visibility", "hidden");
|
|
13055
13185
|
(_a = $$.hideCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$);
|
|
13056
13186
|
}
|
|
@@ -13059,7 +13189,7 @@ var grid = {
|
|
|
13059
13189
|
var _a;
|
|
13060
13190
|
var $$ = this;
|
|
13061
13191
|
var _b = $$.state, inputType = _b.inputType, width = _b.width, height = _b.height, resizing = _b.resizing, grid = $$.$el.grid;
|
|
13062
|
-
var xgridFocus = grid.main.select("line.".concat(
|
|
13192
|
+
var xgridFocus = grid.main.select("line.".concat($FOCUS.xgridFocus));
|
|
13063
13193
|
if (inputType === "touch") {
|
|
13064
13194
|
if (xgridFocus.empty()) {
|
|
13065
13195
|
resizing && ((_a = $$.showCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$));
|
|
@@ -13082,7 +13212,7 @@ var grid = {
|
|
|
13082
13212
|
},
|
|
13083
13213
|
generateGridData: function (type, scale) {
|
|
13084
13214
|
var $$ = this;
|
|
13085
|
-
var tickNum = $$.$el.main.select(".".concat(
|
|
13215
|
+
var tickNum = $$.$el.main.select(".".concat($AXIS.axisX))
|
|
13086
13216
|
.selectAll(".tick")
|
|
13087
13217
|
.size();
|
|
13088
13218
|
var gridData = [];
|
|
@@ -13117,8 +13247,8 @@ var grid = {
|
|
|
13117
13247
|
var config = $$.config, $T = $$.$T;
|
|
13118
13248
|
var toRemove = $$.getGridFilterToRemove(params);
|
|
13119
13249
|
var toShow = function (line) { return !toRemove(line); };
|
|
13120
|
-
var classLines = forX ?
|
|
13121
|
-
var classLine = forX ?
|
|
13250
|
+
var classLines = forX ? $GRID.xgridLines : $GRID.ygridLines;
|
|
13251
|
+
var classLine = forX ? $GRID.xgridLine : $GRID.ygridLine;
|
|
13122
13252
|
$T($$.$el.main.select(".".concat(classLines))
|
|
13123
13253
|
.selectAll(".".concat(classLine))
|
|
13124
13254
|
.filter(toRemove))
|
|
@@ -13140,7 +13270,7 @@ var region = {
|
|
|
13140
13270
|
$el.region.main = $el.main
|
|
13141
13271
|
.insert("g", ":first-child")
|
|
13142
13272
|
.attr("clip-path", $$.state.clip.path)
|
|
13143
|
-
.attr("class",
|
|
13273
|
+
.attr("class", $REGION.regions);
|
|
13144
13274
|
},
|
|
13145
13275
|
updateRegion: function () {
|
|
13146
13276
|
var $$ = this;
|
|
@@ -13152,7 +13282,7 @@ var region = {
|
|
|
13152
13282
|
region.main.style("visibility", $$.hasArcType() ? "hidden" : null);
|
|
13153
13283
|
// select <g> element
|
|
13154
13284
|
var list = region.main
|
|
13155
|
-
.selectAll(".".concat(
|
|
13285
|
+
.selectAll(".".concat($REGION.region))
|
|
13156
13286
|
.data(config.regions);
|
|
13157
13287
|
$T(list.exit())
|
|
13158
13288
|
.style("opacity", "0")
|
|
@@ -13652,15 +13782,16 @@ var x = {
|
|
|
13652
13782
|
*/
|
|
13653
13783
|
axis_x_tick_format: undefined,
|
|
13654
13784
|
/**
|
|
13655
|
-
* Setting for culling ticks
|
|
13656
|
-
*
|
|
13657
|
-
*
|
|
13785
|
+
* Setting for culling ticks.
|
|
13786
|
+
* - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
|
|
13787
|
+
* This option does not hide the tick lines by default, if want to hide tick lines, set `axis.x.tick.culling.lines=false`.
|
|
13788
|
+
* - `false`: all of ticks will be shown.<br><br>
|
|
13789
|
+
* The number of ticks to be shown can be chaned by `axis.x.tick.culling.max`.
|
|
13658
13790
|
* @name axis․x․tick․culling
|
|
13659
13791
|
* @memberof Options
|
|
13660
13792
|
* @type {boolean}
|
|
13661
13793
|
* @default
|
|
13662
|
-
*
|
|
13663
|
-
* - false for category axis
|
|
13794
|
+
* `true` for indexed axis and timeseries axis, `false` for category axis
|
|
13664
13795
|
* @example
|
|
13665
13796
|
* axis: {
|
|
13666
13797
|
* x: {
|
|
@@ -13689,6 +13820,24 @@ var x = {
|
|
|
13689
13820
|
* }
|
|
13690
13821
|
*/
|
|
13691
13822
|
axis_x_tick_culling_max: 10,
|
|
13823
|
+
/**
|
|
13824
|
+
* Control visibility of tick lines within culling option, along with tick text.
|
|
13825
|
+
* @name axis․x․tick․culling․lines
|
|
13826
|
+
* @memberof Options
|
|
13827
|
+
* @type {boolean}
|
|
13828
|
+
* @default true
|
|
13829
|
+
* @example
|
|
13830
|
+
* axis: {
|
|
13831
|
+
* x: {
|
|
13832
|
+
* tick: {
|
|
13833
|
+
* culling: {
|
|
13834
|
+
* lines: false,
|
|
13835
|
+
* }
|
|
13836
|
+
* }
|
|
13837
|
+
* }
|
|
13838
|
+
* }
|
|
13839
|
+
*/
|
|
13840
|
+
axis_x_tick_culling_lines: true,
|
|
13692
13841
|
/**
|
|
13693
13842
|
* The number of x axis ticks to show.<br><br>
|
|
13694
13843
|
* This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).
|
|
@@ -14330,9 +14479,11 @@ var y = {
|
|
|
14330
14479
|
*/
|
|
14331
14480
|
axis_y_tick_format: undefined,
|
|
14332
14481
|
/**
|
|
14333
|
-
* Setting for culling ticks
|
|
14334
|
-
*
|
|
14335
|
-
*
|
|
14482
|
+
* Setting for culling ticks.
|
|
14483
|
+
* - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
|
|
14484
|
+
* This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y.tick.culling.lines=false`.
|
|
14485
|
+
* - `false`: all of ticks will be shown.<br><br>
|
|
14486
|
+
* The number of ticks to be shown can be chaned by `axis.y.tick.culling.max`.
|
|
14336
14487
|
* @name axis․y․tick․culling
|
|
14337
14488
|
* @memberof Options
|
|
14338
14489
|
* @type {boolean}
|
|
@@ -14365,6 +14516,24 @@ var y = {
|
|
|
14365
14516
|
* }
|
|
14366
14517
|
*/
|
|
14367
14518
|
axis_y_tick_culling_max: 5,
|
|
14519
|
+
/**
|
|
14520
|
+
* Control visibility of tick lines within culling option, along with tick text.
|
|
14521
|
+
* @name axis․y․tick․culling․lines
|
|
14522
|
+
* @memberof Options
|
|
14523
|
+
* @type {boolean}
|
|
14524
|
+
* @default true
|
|
14525
|
+
* @example
|
|
14526
|
+
* axis: {
|
|
14527
|
+
* y: {
|
|
14528
|
+
* tick: {
|
|
14529
|
+
* culling: {
|
|
14530
|
+
* lines: false,
|
|
14531
|
+
* }
|
|
14532
|
+
* }
|
|
14533
|
+
* }
|
|
14534
|
+
* }
|
|
14535
|
+
*/
|
|
14536
|
+
axis_y_tick_culling_lines: true,
|
|
14368
14537
|
/**
|
|
14369
14538
|
* Show y axis outer tick.
|
|
14370
14539
|
* @name axis․y․tick․outer
|
|
@@ -14784,9 +14953,11 @@ var y2 = {
|
|
|
14784
14953
|
*/
|
|
14785
14954
|
axis_y2_tick_format: undefined,
|
|
14786
14955
|
/**
|
|
14787
|
-
* Setting for culling ticks
|
|
14788
|
-
*
|
|
14789
|
-
*
|
|
14956
|
+
* Setting for culling ticks.
|
|
14957
|
+
* - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
|
|
14958
|
+
* This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y2.tick.culling.lines=false`.
|
|
14959
|
+
* - `false`: all of ticks will be shown.<br><br>
|
|
14960
|
+
* The number of ticks to be shown can be chaned by `axis.y2.tick.culling.max`.
|
|
14790
14961
|
* @name axis․y2․tick․culling
|
|
14791
14962
|
* @memberof Options
|
|
14792
14963
|
* @type {boolean}
|
|
@@ -14819,6 +14990,24 @@ var y2 = {
|
|
|
14819
14990
|
* }
|
|
14820
14991
|
*/
|
|
14821
14992
|
axis_y2_tick_culling_max: 5,
|
|
14993
|
+
/**
|
|
14994
|
+
* Control visibility of tick lines within culling option, along with tick text.
|
|
14995
|
+
* @name axis․y2․tick․culling․lines
|
|
14996
|
+
* @memberof Options
|
|
14997
|
+
* @type {boolean}
|
|
14998
|
+
* @default true
|
|
14999
|
+
* @example
|
|
15000
|
+
* axis: {
|
|
15001
|
+
* y2: {
|
|
15002
|
+
* tick: {
|
|
15003
|
+
* culling: {
|
|
15004
|
+
* lines: false,
|
|
15005
|
+
* }
|
|
15006
|
+
* }
|
|
15007
|
+
* }
|
|
15008
|
+
* }
|
|
15009
|
+
*/
|
|
15010
|
+
axis_y2_tick_culling_lines: true,
|
|
14822
15011
|
/**
|
|
14823
15012
|
* Show or hide y2 axis outer tick.
|
|
14824
15013
|
* @name axis․y2․tick․outer
|
|
@@ -15443,14 +15632,14 @@ var shapeArc = {
|
|
|
15443
15632
|
var interval_1 = setInterval(function () {
|
|
15444
15633
|
if (!transiting) {
|
|
15445
15634
|
clearInterval(interval_1);
|
|
15446
|
-
$el.legend.selectAll(".".concat(
|
|
15635
|
+
$el.legend.selectAll(".".concat($FOCUS.legendItemFocused)).size() > 0 &&
|
|
15447
15636
|
$$.expandArc(targetIds);
|
|
15448
15637
|
}
|
|
15449
15638
|
}, 10);
|
|
15450
15639
|
return;
|
|
15451
15640
|
}
|
|
15452
15641
|
var newTargetIds = $$.mapToTargetIds(targetIds);
|
|
15453
|
-
$el.svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(
|
|
15642
|
+
$el.svg.selectAll($$.selectorTargets(newTargetIds, ".".concat($ARC.chartArc)))
|
|
15454
15643
|
.each(function (d) {
|
|
15455
15644
|
if (!$$.shouldExpand(d.data.id)) {
|
|
15456
15645
|
return;
|
|
@@ -15473,12 +15662,12 @@ var shapeArc = {
|
|
|
15473
15662
|
return;
|
|
15474
15663
|
}
|
|
15475
15664
|
var newTargetIds = $$.mapToTargetIds(targetIds);
|
|
15476
|
-
svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(
|
|
15665
|
+
svg.selectAll($$.selectorTargets(newTargetIds, ".".concat($ARC.chartArc)))
|
|
15477
15666
|
.selectAll("path")
|
|
15478
15667
|
.transition()
|
|
15479
15668
|
.duration(function (d) { return $$.getExpandConfig(d.data.id, "duration"); })
|
|
15480
15669
|
.attr("d", $$.svgArc);
|
|
15481
|
-
svg.selectAll("".concat(
|
|
15670
|
+
svg.selectAll("".concat($ARC.arc))
|
|
15482
15671
|
.style("opacity", null);
|
|
15483
15672
|
},
|
|
15484
15673
|
/**
|
|
@@ -15544,9 +15733,9 @@ var shapeArc = {
|
|
|
15544
15733
|
var classChartArc = $$.getChartClass("Arc");
|
|
15545
15734
|
var classArcs = $$.getClass("arcs", true);
|
|
15546
15735
|
var classFocus = $$.classFocus.bind($$);
|
|
15547
|
-
var chartArcs = $el.main.select(".".concat(
|
|
15736
|
+
var chartArcs = $el.main.select(".".concat($ARC.chartArcs));
|
|
15548
15737
|
var mainPieUpdate = chartArcs
|
|
15549
|
-
.selectAll(".".concat(
|
|
15738
|
+
.selectAll(".".concat($ARC.chartArc))
|
|
15550
15739
|
.data($$.pie(targets))
|
|
15551
15740
|
.attr("class", function (d) { return classChartArc(d) + classFocus(d.data); });
|
|
15552
15741
|
var mainPieEnter = mainPieUpdate.enter().append("g")
|
|
@@ -15559,16 +15748,16 @@ var shapeArc = {
|
|
|
15559
15748
|
.style("opacity", "0")
|
|
15560
15749
|
.style("text-anchor", "middle")
|
|
15561
15750
|
.style("pointer-events", "none");
|
|
15562
|
-
$el.text = chartArcs.selectAll(".".concat(
|
|
15751
|
+
$el.text = chartArcs.selectAll(".".concat($COMMON.target, " text"));
|
|
15563
15752
|
// MEMO: can not keep same color..., but not bad to update color in redraw
|
|
15564
15753
|
// mainPieUpdate.exit().remove();
|
|
15565
15754
|
},
|
|
15566
15755
|
initArc: function () {
|
|
15567
15756
|
var $$ = this;
|
|
15568
15757
|
var $el = $$.$el;
|
|
15569
|
-
$el.arcs = $el.main.select(".".concat(
|
|
15758
|
+
$el.arcs = $el.main.select(".".concat($COMMON.chart))
|
|
15570
15759
|
.append("g")
|
|
15571
|
-
.attr("class",
|
|
15760
|
+
.attr("class", $ARC.chartArcs)
|
|
15572
15761
|
.attr("transform", $$.getTranslate("arc"));
|
|
15573
15762
|
$$.setArcTitle();
|
|
15574
15763
|
},
|
|
@@ -15582,7 +15771,7 @@ var shapeArc = {
|
|
|
15582
15771
|
var hasGauge = $$.hasType("gauge");
|
|
15583
15772
|
if (title) {
|
|
15584
15773
|
var text = $$.$el.arcs.append("text")
|
|
15585
|
-
.attr("class",
|
|
15774
|
+
.attr("class", hasGauge ? $GAUGE.chartArcsGaugeTitle : $ARC.chartArcsTitle)
|
|
15586
15775
|
.style("text-anchor", "middle");
|
|
15587
15776
|
hasGauge && text.attr("dy", "-0.3em");
|
|
15588
15777
|
setTextValue(text, title, hasGauge ? undefined : [-0.6, 1.35], true);
|
|
@@ -15593,8 +15782,8 @@ var shapeArc = {
|
|
|
15593
15782
|
var config = $$.config, state = $$.state, main = $$.$el.main;
|
|
15594
15783
|
var hasInteraction = config.interaction_enabled;
|
|
15595
15784
|
var isSelectable = hasInteraction && config.data_selection_isselectable;
|
|
15596
|
-
var mainArc = main.selectAll(".".concat(
|
|
15597
|
-
.selectAll(".".concat(
|
|
15785
|
+
var mainArc = main.selectAll(".".concat($ARC.arcs))
|
|
15786
|
+
.selectAll(".".concat($ARC.arc))
|
|
15598
15787
|
.data($$.arcData.bind($$));
|
|
15599
15788
|
mainArc.exit()
|
|
15600
15789
|
.transition()
|
|
@@ -15683,15 +15872,15 @@ var shapeArc = {
|
|
|
15683
15872
|
var isFullCircle = config.gauge_fullCircle;
|
|
15684
15873
|
var startAngle = $$.getStartAngle();
|
|
15685
15874
|
var endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1;
|
|
15686
|
-
var backgroundArc = $$.$el.arcs.select("".concat(hasMultiArcGauge ? "g" : "", ".").concat(
|
|
15875
|
+
var backgroundArc = $$.$el.arcs.select("".concat(hasMultiArcGauge ? "g" : "", ".").concat($ARC.chartArcsBackground));
|
|
15687
15876
|
if (hasMultiArcGauge) {
|
|
15688
15877
|
var index_1 = 0;
|
|
15689
15878
|
backgroundArc = backgroundArc
|
|
15690
|
-
.selectAll("path.".concat(
|
|
15879
|
+
.selectAll("path.".concat($ARC.chartArcsBackground))
|
|
15691
15880
|
.data($$.data.targets);
|
|
15692
15881
|
backgroundArc.enter()
|
|
15693
15882
|
.append("path")
|
|
15694
|
-
.attr("class", function (d, i) { return "".concat(
|
|
15883
|
+
.attr("class", function (d, i) { return "".concat($ARC.chartArcsBackground, " ").concat($ARC.chartArcsBackground, "-").concat(i); })
|
|
15695
15884
|
.merge(backgroundArc)
|
|
15696
15885
|
.style("fill", (config.gauge_background) || null)
|
|
15697
15886
|
.attr("d", function (_a) {
|
|
@@ -15795,6 +15984,7 @@ var shapeArc = {
|
|
|
15795
15984
|
if (state.transiting) { // skip while transiting
|
|
15796
15985
|
return;
|
|
15797
15986
|
}
|
|
15987
|
+
state.event = event;
|
|
15798
15988
|
var eventArc = getEventArc_1(event);
|
|
15799
15989
|
var datum = eventArc.datum();
|
|
15800
15990
|
var updated = ((datum === null || datum === void 0 ? void 0 : datum.data) && datum.data.id) ? $$.updateAngle(datum) : null;
|
|
@@ -15814,10 +16004,10 @@ var shapeArc = {
|
|
|
15814
16004
|
var text;
|
|
15815
16005
|
// for gauge type, update text when has no title & multi data
|
|
15816
16006
|
if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
|
|
15817
|
-
text = main.selectAll(".".concat(
|
|
16007
|
+
text = main.selectAll(".".concat($ARC.chartArc))
|
|
15818
16008
|
.select("text")
|
|
15819
16009
|
.style("opacity", "0")
|
|
15820
|
-
.attr("class", function (d) { return ($$.isGaugeType(d.data) ?
|
|
16010
|
+
.attr("class", function (d) { return ($$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null); })
|
|
15821
16011
|
.call($$.textForArcLabel.bind($$))
|
|
15822
16012
|
.attr("transform", $$.transformForArcLabel.bind($$))
|
|
15823
16013
|
.style("font-size", function (d) { return ($$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ?
|
|
@@ -15827,21 +16017,21 @@ var shapeArc = {
|
|
|
15827
16017
|
.style("opacity", function (d) { return ($$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? null : "0"); });
|
|
15828
16018
|
hasMultiArcGauge && text.attr("dy", "-.1em");
|
|
15829
16019
|
}
|
|
15830
|
-
main.select(".".concat(
|
|
16020
|
+
main.select(".".concat($ARC.chartArcsTitle))
|
|
15831
16021
|
.style("opacity", $$.hasType("donut") || hasGauge ? null : "0");
|
|
15832
16022
|
if (hasGauge) {
|
|
15833
16023
|
var isFullCircle = config.gauge_fullCircle;
|
|
15834
16024
|
isFullCircle && (text === null || text === void 0 ? void 0 : text.attr("dy", "".concat(hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
|
|
15835
16025
|
if (config.gauge_label_show) {
|
|
15836
|
-
arcs.select(".".concat(
|
|
16026
|
+
arcs.select(".".concat($GAUGE.chartArcsGaugeUnit))
|
|
15837
16027
|
.attr("dy", "".concat(isFullCircle ? 1.5 : 0.75, "em"))
|
|
15838
16028
|
.text(config.gauge_units);
|
|
15839
|
-
arcs.select(".".concat(
|
|
16029
|
+
arcs.select(".".concat($GAUGE.chartArcsGaugeMin))
|
|
15840
16030
|
.attr("dx", "".concat(-1 * (state.innerRadius + ((state.radius - state.innerRadius) / (isFullCircle ? 1 : 2))), "px"))
|
|
15841
16031
|
.attr("dy", "1.2em")
|
|
15842
16032
|
.text($$.textForGaugeMinMax(config.gauge_min, false));
|
|
15843
16033
|
// show max text when isn't fullCircle
|
|
15844
|
-
!isFullCircle && arcs.select(".".concat(
|
|
16034
|
+
!isFullCircle && arcs.select(".".concat($GAUGE.chartArcsGaugeMax))
|
|
15845
16035
|
.attr("dx", "".concat(state.innerRadius + ((state.radius - state.innerRadius) / 2), "px"))
|
|
15846
16036
|
.attr("dy", "1.2em")
|
|
15847
16037
|
.text($$.textForGaugeMinMax(config.gauge_max, true));
|
|
@@ -15859,7 +16049,7 @@ var shapeArea = {
|
|
|
15859
16049
|
var $$ = this;
|
|
15860
16050
|
var config = $$.config;
|
|
15861
16051
|
mainLine
|
|
15862
|
-
.insert("g", ".".concat(
|
|
16052
|
+
.insert("g", ".".concat(config.area_front ? $CIRCLE.circles : $LINE.lines))
|
|
15863
16053
|
.attr("class", $$.getClass("areas", true));
|
|
15864
16054
|
},
|
|
15865
16055
|
updateAreaGradient: function () {
|
|
@@ -15904,8 +16094,8 @@ var shapeArea = {
|
|
|
15904
16094
|
var config = $$.config, state = $$.state, $el = $$.$el, $T = $$.$T;
|
|
15905
16095
|
var $root = isSub ? $el.subchart : $el;
|
|
15906
16096
|
config.area_linearGradient && $$.updateAreaGradient();
|
|
15907
|
-
var area = $root.main.selectAll(".".concat(
|
|
15908
|
-
.selectAll(".".concat(
|
|
16097
|
+
var area = $root.main.selectAll(".".concat($AREA.areas))
|
|
16098
|
+
.selectAll(".".concat($AREA.area))
|
|
15909
16099
|
.data($$.lineData.bind($$));
|
|
15910
16100
|
$T(area.exit(), withTransition)
|
|
15911
16101
|
.style("opacity", "0")
|
|
@@ -16026,10 +16216,10 @@ var shapeArea = {
|
|
|
16026
16216
|
var shapeBar = {
|
|
16027
16217
|
initBar: function () {
|
|
16028
16218
|
var _a = this, $el = _a.$el, config = _a.config, clip = _a.state.clip;
|
|
16029
|
-
$el.bar = $el.main.select(".".concat(
|
|
16219
|
+
$el.bar = $el.main.select(".".concat($COMMON.chart))
|
|
16030
16220
|
// should positioned at the beginning of the shape node to not overlap others
|
|
16031
16221
|
.insert("g", ":first-child")
|
|
16032
|
-
.attr("class",
|
|
16222
|
+
.attr("class", $BAR.chartBars);
|
|
16033
16223
|
// set clip-path attribute when condition meet
|
|
16034
16224
|
// https://github.com/naver/billboard.js/issues/2421
|
|
16035
16225
|
if (config.clipPath === false && (config.bar_radius || config.bar_radius_ratio)) {
|
|
@@ -16046,8 +16236,8 @@ var shapeBar = {
|
|
|
16046
16236
|
if (!$el.bar) {
|
|
16047
16237
|
$$.initBar();
|
|
16048
16238
|
}
|
|
16049
|
-
var mainBarUpdate = $$.$el.main.select(".".concat(
|
|
16050
|
-
.selectAll(".".concat(
|
|
16239
|
+
var mainBarUpdate = $$.$el.main.select(".".concat($BAR.chartBars))
|
|
16240
|
+
.selectAll(".".concat($BAR.chartBar))
|
|
16051
16241
|
.data(
|
|
16052
16242
|
// remove
|
|
16053
16243
|
targets.filter(function (v) { return v.values.some(function (d) { return (isNumber(d.value) || $$.isBarRangeType(d)); }); }))
|
|
@@ -16074,8 +16264,8 @@ var shapeBar = {
|
|
|
16074
16264
|
var $root = isSub ? $el.subchart : $el;
|
|
16075
16265
|
var classBar = $$.getClass("bar", true);
|
|
16076
16266
|
var initialOpacity = $$.initialOpacity.bind($$);
|
|
16077
|
-
var bar = $root.main.selectAll(".".concat(
|
|
16078
|
-
.selectAll(".".concat(
|
|
16267
|
+
var bar = $root.main.selectAll(".".concat($BAR.bars))
|
|
16268
|
+
.selectAll(".".concat($BAR.bar))
|
|
16079
16269
|
.data($$.labelishData.bind($$));
|
|
16080
16270
|
$T(bar.exit(), withTransition)
|
|
16081
16271
|
.style("opacity", "0")
|
|
@@ -16143,8 +16333,10 @@ var shapeBar = {
|
|
|
16143
16333
|
var isNegative = d.value < 0;
|
|
16144
16334
|
var pathRadius = ["", ""];
|
|
16145
16335
|
var radius = 0;
|
|
16146
|
-
var
|
|
16147
|
-
|
|
16336
|
+
var isGrouped = $$.isGrouped(d.id);
|
|
16337
|
+
var hasRadius = d.value !== 0 && getRadius;
|
|
16338
|
+
var isRadiusData = hasRadius && isGrouped ? $$.isStackingRadiusData(d) : false;
|
|
16339
|
+
if (hasRadius && (!isGrouped || isRadiusData)) {
|
|
16148
16340
|
var index = isRotated ? indexY : indexX;
|
|
16149
16341
|
var barW = points[2][index] - points[0][index];
|
|
16150
16342
|
radius = getRadius(barW);
|
|
@@ -16227,10 +16419,10 @@ var shapeBar = {
|
|
|
16227
16419
|
var shapeCandlestick = {
|
|
16228
16420
|
initCandlestick: function () {
|
|
16229
16421
|
var $el = this.$el;
|
|
16230
|
-
$el.candlestick = $el.main.select(".".concat(
|
|
16422
|
+
$el.candlestick = $el.main.select(".".concat($COMMON.chart))
|
|
16231
16423
|
// should positioned at the beginning of the shape node to not overlap others
|
|
16232
16424
|
.append("g")
|
|
16233
|
-
.attr("class",
|
|
16425
|
+
.attr("class", $CANDLESTICK.chartCandlesticks);
|
|
16234
16426
|
},
|
|
16235
16427
|
/**
|
|
16236
16428
|
* Update targets by its data
|
|
@@ -16246,8 +16438,8 @@ var shapeCandlestick = {
|
|
|
16246
16438
|
if (!$el.candlestick) {
|
|
16247
16439
|
$$.initCandlestick();
|
|
16248
16440
|
}
|
|
16249
|
-
var mainUpdate = $$.$el.main.select(".".concat(
|
|
16250
|
-
.selectAll(".".concat(
|
|
16441
|
+
var mainUpdate = $$.$el.main.select(".".concat($CANDLESTICK.chartCandlesticks))
|
|
16442
|
+
.selectAll(".".concat($CANDLESTICK.chartCandlestick))
|
|
16251
16443
|
.data(targets)
|
|
16252
16444
|
.attr("class", function (d) { return classChart(d) + classFocus(d); });
|
|
16253
16445
|
mainUpdate.enter().append("g")
|
|
@@ -16267,8 +16459,8 @@ var shapeCandlestick = {
|
|
|
16267
16459
|
var $root = isSub ? $el.subchart : $el;
|
|
16268
16460
|
var classSetter = $$.getClass("candlestick", true);
|
|
16269
16461
|
var initialOpacity = $$.initialOpacity.bind($$);
|
|
16270
|
-
var candlestick = $root.main.selectAll(".".concat(
|
|
16271
|
-
.selectAll(".".concat(
|
|
16462
|
+
var candlestick = $root.main.selectAll(".".concat($CANDLESTICK.chartCandlestick))
|
|
16463
|
+
.selectAll(".".concat($CANDLESTICK.candlestick))
|
|
16272
16464
|
.data($$.labelishData.bind($$));
|
|
16273
16465
|
$T(candlestick.exit(), withTransition)
|
|
16274
16466
|
.style("opacity", "0")
|
|
@@ -16306,7 +16498,7 @@ var shapeCandlestick = {
|
|
|
16306
16498
|
var indexX = +isRotated;
|
|
16307
16499
|
var indexY = +!indexX;
|
|
16308
16500
|
if (g.classed) {
|
|
16309
|
-
g.classed(
|
|
16501
|
+
g.classed($CANDLESTICK[isUp ? "valueUp" : "valueDown"], true);
|
|
16310
16502
|
}
|
|
16311
16503
|
var path = isRotated ?
|
|
16312
16504
|
"H".concat(points[1][1], " V").concat(points[1][0], " H").concat(points[0][1]) :
|
|
@@ -16456,12 +16648,12 @@ var shapeGauge = {
|
|
|
16456
16648
|
if ($$.hasType("gauge")) {
|
|
16457
16649
|
var hasMulti = $$.hasMultiArcGauge();
|
|
16458
16650
|
arcs.append(hasMulti ? "g" : "path")
|
|
16459
|
-
.attr("class",
|
|
16651
|
+
.attr("class", $ARC.chartArcsBackground)
|
|
16460
16652
|
.style("fill", (!hasMulti && config.gauge_background) || null);
|
|
16461
|
-
config.gauge_units && appendText(
|
|
16653
|
+
config.gauge_units && appendText($GAUGE.chartArcsGaugeUnit);
|
|
16462
16654
|
if (config.gauge_label_show) {
|
|
16463
|
-
appendText(
|
|
16464
|
-
!config.gauge_fullCircle && appendText(
|
|
16655
|
+
appendText($GAUGE.chartArcsGaugeMin);
|
|
16656
|
+
!config.gauge_fullCircle && appendText($GAUGE.chartArcsGaugeMax);
|
|
16465
16657
|
}
|
|
16466
16658
|
}
|
|
16467
16659
|
},
|
|
@@ -16481,12 +16673,12 @@ var shapeGauge = {
|
|
|
16481
16673
|
var $$ = this;
|
|
16482
16674
|
var config = $$.config, state = $$.state, $el = $$.$el;
|
|
16483
16675
|
var hiddenTargetIds = $$.state.hiddenTargetIds;
|
|
16484
|
-
var arcLabelLines = $el.main.selectAll(".".concat(
|
|
16485
|
-
.selectAll(".".concat(
|
|
16676
|
+
var arcLabelLines = $el.main.selectAll(".".concat($ARC.arcs))
|
|
16677
|
+
.selectAll(".".concat($ARC.arcLabelLine))
|
|
16486
16678
|
.data($$.arcData.bind($$));
|
|
16487
16679
|
var mainArcLabelLine = arcLabelLines.enter()
|
|
16488
16680
|
.append("rect")
|
|
16489
|
-
.attr("class", function (d) { return "".concat(
|
|
16681
|
+
.attr("class", function (d) { return "".concat($ARC.arcLabelLine, " ").concat($COMMON.target, " ").concat($COMMON.target, "-").concat(d.data.id); })
|
|
16490
16682
|
.merge(arcLabelLines);
|
|
16491
16683
|
mainArcLabelLine
|
|
16492
16684
|
.style("fill", function (d) { return ($$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data)); })
|
|
@@ -16607,8 +16799,8 @@ var shapeBubble = {
|
|
|
16607
16799
|
var shapeLine = {
|
|
16608
16800
|
initLine: function () {
|
|
16609
16801
|
var $el = this.$el;
|
|
16610
|
-
$el.line = $el.main.select(".".concat(
|
|
16611
|
-
.attr("class",
|
|
16802
|
+
$el.line = $el.main.select(".".concat($COMMON.chart)).append("g")
|
|
16803
|
+
.attr("class", $LINE.chartLines);
|
|
16612
16804
|
},
|
|
16613
16805
|
updateTargetsForLine: function (t) {
|
|
16614
16806
|
var $$ = this;
|
|
@@ -16620,8 +16812,8 @@ var shapeLine = {
|
|
|
16620
16812
|
$$.initLine();
|
|
16621
16813
|
}
|
|
16622
16814
|
var targets = t.filter(function (d) { return !($$.isScatterType(d) || $$.isBubbleType(d)); });
|
|
16623
|
-
var mainLineUpdate = main.select(".".concat(
|
|
16624
|
-
.selectAll(".".concat(
|
|
16815
|
+
var mainLineUpdate = main.select(".".concat($LINE.chartLines))
|
|
16816
|
+
.selectAll(".".concat($LINE.chartLine))
|
|
16625
16817
|
.data(targets)
|
|
16626
16818
|
.attr("class", function (d) { return classChartLine(d) + classFocus(d); });
|
|
16627
16819
|
var mainLineEnter = mainLineUpdate.enter().append("g")
|
|
@@ -16649,8 +16841,8 @@ var shapeLine = {
|
|
|
16649
16841
|
var extraLineClasses = $$.format.extraLineClasses, $el = $$.$el, $T = $$.$T;
|
|
16650
16842
|
var $root = isSub ? $el.subchart : $el;
|
|
16651
16843
|
var line = $root.main
|
|
16652
|
-
.selectAll(".".concat(
|
|
16653
|
-
.selectAll(".".concat(
|
|
16844
|
+
.selectAll(".".concat($LINE.lines))
|
|
16845
|
+
.selectAll(".".concat($LINE.line))
|
|
16654
16846
|
.data($$.lineData.bind($$));
|
|
16655
16847
|
$T(line.exit(), withTransition)
|
|
16656
16848
|
.style("opacity", "0")
|
|
@@ -16895,10 +17087,10 @@ var shapePoint = {
|
|
|
16895
17087
|
var $$ = this;
|
|
16896
17088
|
var main = $$.$el.main;
|
|
16897
17089
|
$$.point = $$.generatePoint();
|
|
16898
|
-
if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select(".".concat(
|
|
16899
|
-
main.select(".".concat(
|
|
17090
|
+
if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select(".".concat($CIRCLE.chartCircles)).empty()) {
|
|
17091
|
+
main.select(".".concat($COMMON.chart))
|
|
16900
17092
|
.append("g")
|
|
16901
|
-
.attr("class",
|
|
17093
|
+
.attr("class", $CIRCLE.chartCircles);
|
|
16902
17094
|
}
|
|
16903
17095
|
},
|
|
16904
17096
|
updateTargetForCircle: function (targetsValue, enterNodeValue) {
|
|
@@ -16918,9 +17110,9 @@ var shapePoint = {
|
|
|
16918
17110
|
if (!targets) {
|
|
16919
17111
|
targets = (data.targets)
|
|
16920
17112
|
.filter(function (d) { return _this.isScatterType(d) || _this.isBubbleType(d); });
|
|
16921
|
-
var mainCircle = $el.main.select(".".concat(
|
|
17113
|
+
var mainCircle = $el.main.select(".".concat($CIRCLE.chartCircles))
|
|
16922
17114
|
.style("pointer-events", "none")
|
|
16923
|
-
.selectAll(".".concat(
|
|
17115
|
+
.selectAll(".".concat($CIRCLE.circles))
|
|
16924
17116
|
.data(targets)
|
|
16925
17117
|
.attr("class", classCircles);
|
|
16926
17118
|
mainCircle.exit().remove();
|
|
@@ -16928,14 +17120,14 @@ var shapePoint = {
|
|
|
16928
17120
|
}
|
|
16929
17121
|
// Circles for each data point on lines
|
|
16930
17122
|
selectionEnabled && enterNode.append("g")
|
|
16931
|
-
.attr("class", function (d) { return $$.generateClass(
|
|
17123
|
+
.attr("class", function (d) { return $$.generateClass($SELECT.selectedCircles, d.id); });
|
|
16932
17124
|
enterNode.append("g")
|
|
16933
17125
|
.attr("class", classCircles)
|
|
16934
17126
|
.style("cursor", function (d) { return (isFunction(isSelectable) && isSelectable(d) ? "pointer" : null); });
|
|
16935
17127
|
// Update date for selected circles
|
|
16936
17128
|
selectionEnabled && targets.forEach(function (t) {
|
|
16937
|
-
$el.main.selectAll(".".concat(
|
|
16938
|
-
.selectAll("".concat(
|
|
17129
|
+
$el.main.selectAll(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(t.id)))
|
|
17130
|
+
.selectAll("".concat($SELECT.selectedCircle))
|
|
16939
17131
|
.each(function (d) {
|
|
16940
17132
|
d.value = t.values[d.index].value;
|
|
16941
17133
|
});
|
|
@@ -16948,8 +17140,8 @@ var shapePoint = {
|
|
|
16948
17140
|
var focusOnly = config.point_focus_only;
|
|
16949
17141
|
var $root = isSub ? $el.subchart : $el;
|
|
16950
17142
|
if (config.point_show && !state.toggling) {
|
|
16951
|
-
var circles = $root.main.selectAll(".".concat(
|
|
16952
|
-
.selectAll(".".concat(
|
|
17143
|
+
var circles = $root.main.selectAll(".".concat($CIRCLE.circles))
|
|
17144
|
+
.selectAll(".".concat($CIRCLE.circle))
|
|
16953
17145
|
.data(function (d) { return (($$.isLineType(d) && $$.shouldDrawPointsForLine(d)) ||
|
|
16954
17146
|
$$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ?
|
|
16955
17147
|
(focusOnly ? [d.values[0]] : d.values) : []); });
|
|
@@ -16957,7 +17149,7 @@ var shapePoint = {
|
|
|
16957
17149
|
circles.enter()
|
|
16958
17150
|
.filter(Boolean)
|
|
16959
17151
|
.append($$.point("create", this, $$.pointR.bind($$), $$.color));
|
|
16960
|
-
$root.circle = $root.main.selectAll(".".concat(
|
|
17152
|
+
$root.circle = $root.main.selectAll(".".concat($CIRCLE.circles, " .").concat($CIRCLE.circle))
|
|
16961
17153
|
.style("stroke", $$.color)
|
|
16962
17154
|
.style("opacity", $$.initialOpacityForCircle.bind($$));
|
|
16963
17155
|
}
|
|
@@ -16967,7 +17159,7 @@ var shapePoint = {
|
|
|
16967
17159
|
var $$ = this;
|
|
16968
17160
|
var rendered = $$.state.rendered, $el = $$.$el, $T = $$.$T;
|
|
16969
17161
|
var $root = isSub ? $el.subchart : $el;
|
|
16970
|
-
var selectedCircles = $root.main.selectAll(".".concat(
|
|
17162
|
+
var selectedCircles = $root.main.selectAll(".".concat($SELECT.selectedCircle));
|
|
16971
17163
|
if (!$$.config.point_show) {
|
|
16972
17164
|
return [];
|
|
16973
17165
|
}
|
|
@@ -17056,7 +17248,7 @@ var shapePoint = {
|
|
|
17056
17248
|
var $$ = this;
|
|
17057
17249
|
var r = $$.pointExpandedR.bind($$);
|
|
17058
17250
|
reset && $$.unexpandCircles();
|
|
17059
|
-
var circles = $$.getShapeByIndex("circle", i, id).classed(
|
|
17251
|
+
var circles = $$.getShapeByIndex("circle", i, id).classed($COMMON.EXPANDED, true);
|
|
17060
17252
|
var scale = r(circles) / $$.config.point_r;
|
|
17061
17253
|
var ratio = 1 - scale;
|
|
17062
17254
|
if ($$.isCirclePoint()) {
|
|
@@ -17083,9 +17275,9 @@ var shapePoint = {
|
|
|
17083
17275
|
var r = $$.pointR.bind($$);
|
|
17084
17276
|
var circles = $$.getShapeByIndex("circle", i)
|
|
17085
17277
|
.filter(function () {
|
|
17086
|
-
return select(this).classed(
|
|
17278
|
+
return select(this).classed($COMMON.EXPANDED);
|
|
17087
17279
|
})
|
|
17088
|
-
.classed(
|
|
17280
|
+
.classed($COMMON.EXPANDED, false);
|
|
17089
17281
|
circles.attr("r", r);
|
|
17090
17282
|
!$$.isCirclePoint() &&
|
|
17091
17283
|
circles.attr("transform", "scale(".concat(r(circles) / $$.config.point_r, ")"));
|
|
@@ -17171,8 +17363,8 @@ var shapePoint = {
|
|
|
17171
17363
|
pointClass = d === true ?
|
|
17172
17364
|
circle.each(function (d) {
|
|
17173
17365
|
var className = $$.getClass("circle", true)(d);
|
|
17174
|
-
if (this.getAttribute("class").indexOf(
|
|
17175
|
-
className += " ".concat(
|
|
17366
|
+
if (this.getAttribute("class").indexOf($COMMON.EXPANDED) > -1) {
|
|
17367
|
+
className += " ".concat($COMMON.EXPANDED);
|
|
17176
17368
|
}
|
|
17177
17369
|
this.setAttribute("class", className);
|
|
17178
17370
|
}) : $$.getClass("circle", true)(d);
|
|
@@ -17353,17 +17545,17 @@ var shapeRadar = {
|
|
|
17353
17545
|
var $$ = this;
|
|
17354
17546
|
var config = $$.config, current = $$.state.current, $el = $$.$el;
|
|
17355
17547
|
if ($$.hasType("radar")) {
|
|
17356
|
-
$el.radar = $el.main.select(".".concat(
|
|
17357
|
-
.attr("class",
|
|
17548
|
+
$el.radar = $el.main.select(".".concat($COMMON.chart)).append("g")
|
|
17549
|
+
.attr("class", $RADAR.chartRadars);
|
|
17358
17550
|
// level
|
|
17359
17551
|
$el.radar.levels = $el.radar.append("g")
|
|
17360
|
-
.attr("class",
|
|
17552
|
+
.attr("class", $RADAR.levels);
|
|
17361
17553
|
// axis
|
|
17362
17554
|
$el.radar.axes = $el.radar.append("g")
|
|
17363
|
-
.attr("class",
|
|
17555
|
+
.attr("class", $AXIS.axis);
|
|
17364
17556
|
// shapes
|
|
17365
17557
|
$el.radar.shapes = $el.radar.append("g")
|
|
17366
|
-
.attr("class",
|
|
17558
|
+
.attr("class", $SHAPE.shapes);
|
|
17367
17559
|
current.dataMax = config.radar_axis_max || $$.getMinMaxData().max[0].value;
|
|
17368
17560
|
}
|
|
17369
17561
|
},
|
|
@@ -17417,7 +17609,7 @@ var shapeRadar = {
|
|
|
17417
17609
|
// Adjust radar, circles and texts' position
|
|
17418
17610
|
if (translate) {
|
|
17419
17611
|
radar.attr("transform", translate);
|
|
17420
|
-
main.select(".".concat(
|
|
17612
|
+
main.select(".".concat($TEXT.chartTexts)).attr("transform", translate);
|
|
17421
17613
|
$$.generateRadarPoints();
|
|
17422
17614
|
$$.updateRadarLevel();
|
|
17423
17615
|
$$.updateRadarAxes();
|
|
@@ -17455,11 +17647,11 @@ var shapeRadar = {
|
|
|
17455
17647
|
return pos.join(" ");
|
|
17456
17648
|
});
|
|
17457
17649
|
var level = radarLevels
|
|
17458
|
-
.selectAll(".".concat(
|
|
17650
|
+
.selectAll(".".concat($RADAR.level))
|
|
17459
17651
|
.data(levelData);
|
|
17460
17652
|
level.exit().remove();
|
|
17461
17653
|
var levelEnter = level.enter().append("g")
|
|
17462
|
-
.attr("class", function (d, i) { return "".concat(
|
|
17654
|
+
.attr("class", function (d, i) { return "".concat($RADAR.level, " ").concat($RADAR.level, "-").concat(i); });
|
|
17463
17655
|
levelEnter.append("polygon")
|
|
17464
17656
|
.style("visibility", config.radar_level_show ? null : "hidden");
|
|
17465
17657
|
if (showText) {
|
|
@@ -17497,7 +17689,7 @@ var shapeRadar = {
|
|
|
17497
17689
|
.data(categories);
|
|
17498
17690
|
axis.exit().remove();
|
|
17499
17691
|
var axisEnter = axis.enter().append("g")
|
|
17500
|
-
.attr("class", function (d, i) { return "".concat(
|
|
17692
|
+
.attr("class", function (d, i) { return "".concat($AXIS.axis, "-").concat(i); });
|
|
17501
17693
|
config.radar_axis_line_show && axisEnter.append("line");
|
|
17502
17694
|
config.radar_axis_text_show && axisEnter.append("text");
|
|
17503
17695
|
axis = axisEnter.merge(axis);
|
|
@@ -17566,6 +17758,7 @@ var shapeRadar = {
|
|
|
17566
17758
|
return d && Object.keys(d).length === 1 ? d.index : undefined;
|
|
17567
17759
|
};
|
|
17568
17760
|
var hide = function (event) {
|
|
17761
|
+
state.event = event;
|
|
17569
17762
|
var index = getIndex_1(event);
|
|
17570
17763
|
var noIndex = isUndefined(index);
|
|
17571
17764
|
if (isMouse_1 || noIndex) {
|
|
@@ -17816,6 +18009,7 @@ var optBar = {
|
|
|
17816
18009
|
* @memberof Options
|
|
17817
18010
|
* @type {object}
|
|
17818
18011
|
* @property {object} bar Bar object
|
|
18012
|
+
* @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.
|
|
17819
18013
|
* @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
|
|
17820
18014
|
* @property {number} [bar.padding=0] The padding pixel value between each bar.
|
|
17821
18015
|
* @property {number} [bar.radius] Set the radius of bar edge in pixel.
|
|
@@ -17831,12 +18025,18 @@ var optBar = {
|
|
|
17831
18025
|
* @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
|
|
17832
18026
|
* @property {number} [bar.width.dataname.max] The maximum width value for ratio.
|
|
17833
18027
|
* @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
|
|
18028
|
+
* @see [Demo: bar indices](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarIndices)
|
|
17834
18029
|
* @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)
|
|
17835
18030
|
* @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)
|
|
17836
18031
|
* @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)
|
|
17837
18032
|
* @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)
|
|
17838
18033
|
* @example
|
|
17839
18034
|
* bar: {
|
|
18035
|
+
* // remove nullish data on bar indices postions
|
|
18036
|
+
* indices: {
|
|
18037
|
+
* removeNull: true
|
|
18038
|
+
* },
|
|
18039
|
+
*
|
|
17840
18040
|
* padding: 1,
|
|
17841
18041
|
*
|
|
17842
18042
|
* // bar radius
|
|
@@ -17876,6 +18076,7 @@ var optBar = {
|
|
|
17876
18076
|
* }
|
|
17877
18077
|
*/
|
|
17878
18078
|
bar_label_threshold: 0,
|
|
18079
|
+
bar_indices_removeNull: false,
|
|
17879
18080
|
bar_padding: 0,
|
|
17880
18081
|
bar_radius: undefined,
|
|
17881
18082
|
bar_radius_ratio: undefined,
|
|
@@ -18583,10 +18784,10 @@ var apiSelection = {
|
|
|
18583
18784
|
selected: function (targetId) {
|
|
18584
18785
|
var $$ = this.internal;
|
|
18585
18786
|
var dataPoint = [];
|
|
18586
|
-
$$.$el.main.selectAll(".".concat(
|
|
18587
|
-
.selectAll(".".concat(
|
|
18787
|
+
$$.$el.main.selectAll(".".concat($SHAPE.shapes + $$.getTargetSelectorSuffix(targetId)))
|
|
18788
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
18588
18789
|
.filter(function () {
|
|
18589
|
-
return select(this).classed(
|
|
18790
|
+
return select(this).classed($SELECT.SELECTED);
|
|
18590
18791
|
})
|
|
18591
18792
|
.each(function (d) { return dataPoint.push(d); });
|
|
18592
18793
|
return dataPoint;
|
|
@@ -18621,26 +18822,26 @@ var apiSelection = {
|
|
|
18621
18822
|
if (!config.data_selection_enabled) {
|
|
18622
18823
|
return;
|
|
18623
18824
|
}
|
|
18624
|
-
$el.main.selectAll(".".concat(
|
|
18625
|
-
.selectAll(".".concat(
|
|
18825
|
+
$el.main.selectAll(".".concat($SHAPE.shapes))
|
|
18826
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
18626
18827
|
.each(function (d, i) {
|
|
18627
18828
|
var shape = select(this);
|
|
18628
18829
|
var id = d.data ? d.data.id : d.id;
|
|
18629
18830
|
var toggle = $$.getToggle(this, d).bind($$);
|
|
18630
18831
|
var isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;
|
|
18631
18832
|
var isTargetIndex = !indices || indices.indexOf(i) >= 0;
|
|
18632
|
-
var isSelected = shape.classed(
|
|
18833
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
18633
18834
|
// line/area selection not supported yet
|
|
18634
|
-
if (shape.classed(
|
|
18835
|
+
if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
|
|
18635
18836
|
return;
|
|
18636
18837
|
}
|
|
18637
18838
|
if (isTargetId && isTargetIndex) {
|
|
18638
18839
|
if (config.data_selection_isselectable.bind($$.api)(d) && !isSelected) {
|
|
18639
|
-
toggle(true, shape.classed(
|
|
18840
|
+
toggle(true, shape.classed($SELECT.SELECTED, true), d, i);
|
|
18640
18841
|
}
|
|
18641
18842
|
}
|
|
18642
18843
|
else if (isDefined(resetOther) && resetOther && isSelected) {
|
|
18643
|
-
toggle(false, shape.classed(
|
|
18844
|
+
toggle(false, shape.classed($SELECT.SELECTED, false), d, i);
|
|
18644
18845
|
}
|
|
18645
18846
|
});
|
|
18646
18847
|
},
|
|
@@ -18667,24 +18868,24 @@ var apiSelection = {
|
|
|
18667
18868
|
if (!config.data_selection_enabled) {
|
|
18668
18869
|
return;
|
|
18669
18870
|
}
|
|
18670
|
-
$el.main.selectAll(".".concat(
|
|
18671
|
-
.selectAll(".".concat(
|
|
18871
|
+
$el.main.selectAll(".".concat($SHAPE.shapes))
|
|
18872
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
18672
18873
|
.each(function (d, i) {
|
|
18673
18874
|
var shape = select(this);
|
|
18674
18875
|
var id = d.data ? d.data.id : d.id;
|
|
18675
18876
|
var toggle = $$.getToggle(this, d).bind($$);
|
|
18676
18877
|
var isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;
|
|
18677
18878
|
var isTargetIndex = !indices || indices.indexOf(i) >= 0;
|
|
18678
|
-
var isSelected = shape.classed(
|
|
18879
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
18679
18880
|
// line/area selection not supported yet
|
|
18680
|
-
if (shape.classed(
|
|
18881
|
+
if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
|
|
18681
18882
|
return;
|
|
18682
18883
|
}
|
|
18683
18884
|
if (isTargetId &&
|
|
18684
18885
|
isTargetIndex &&
|
|
18685
18886
|
config.data_selection_isselectable.bind($$.api)(d) &&
|
|
18686
18887
|
isSelected) {
|
|
18687
|
-
toggle(false, shape.classed(
|
|
18888
|
+
toggle(false, shape.classed($SELECT.SELECTED, false), d, i);
|
|
18688
18889
|
}
|
|
18689
18890
|
});
|
|
18690
18891
|
}
|
|
@@ -18720,6 +18921,7 @@ var apiSubchart = {
|
|
|
18720
18921
|
* chart.subchart.show();
|
|
18721
18922
|
*/
|
|
18722
18923
|
show: function () {
|
|
18924
|
+
var _a, _b;
|
|
18723
18925
|
var $$ = this.internal;
|
|
18724
18926
|
var subchart = $$.$el.subchart, config = $$.config;
|
|
18725
18927
|
var show = config.subchart_show;
|
|
@@ -18728,16 +18930,16 @@ var apiSubchart = {
|
|
|
18728
18930
|
$$.unbindZoomEvent();
|
|
18729
18931
|
config.subchart_show = !show;
|
|
18730
18932
|
!subchart.main && $$.initSubchart();
|
|
18731
|
-
var $target = subchart.main.selectAll(".".concat(
|
|
18933
|
+
var $target = subchart.main.selectAll(".".concat($COMMON.target));
|
|
18732
18934
|
// need to cover when new data has been loaded
|
|
18733
18935
|
if ($$.data.targets.length !== $target.size()) {
|
|
18734
18936
|
$$.updateSizes();
|
|
18735
18937
|
$$.updateTargetsForSubchart($$.data.targets);
|
|
18736
|
-
$target = subchart.main.selectAll(".".concat(
|
|
18938
|
+
$target = (_a = subchart.main) === null || _a === void 0 ? void 0 : _a.selectAll(".".concat($COMMON.target));
|
|
18737
18939
|
}
|
|
18738
|
-
$target.style("opacity", null);
|
|
18739
|
-
subchart.main.style("display", null);
|
|
18740
|
-
this.
|
|
18940
|
+
$target === null || $target === void 0 ? void 0 : $target.style("opacity", null);
|
|
18941
|
+
(_b = subchart.main) === null || _b === void 0 ? void 0 : _b.style("display", null);
|
|
18942
|
+
this.resize();
|
|
18741
18943
|
}
|
|
18742
18944
|
},
|
|
18743
18945
|
/**
|
|
@@ -18751,11 +18953,11 @@ var apiSubchart = {
|
|
|
18751
18953
|
*/
|
|
18752
18954
|
hide: function () {
|
|
18753
18955
|
var $$ = this.internal;
|
|
18754
|
-
var
|
|
18755
|
-
if (config.subchart_show &&
|
|
18956
|
+
var main = $$.$el.subchart.main, config = $$.config;
|
|
18957
|
+
if (config.subchart_show && (main === null || main === void 0 ? void 0 : main.style("display")) !== "none") {
|
|
18756
18958
|
config.subchart_show = false;
|
|
18757
|
-
|
|
18758
|
-
this.
|
|
18959
|
+
main.style("display", "none");
|
|
18960
|
+
this.resize();
|
|
18759
18961
|
}
|
|
18760
18962
|
},
|
|
18761
18963
|
/**
|
|
@@ -19019,28 +19221,28 @@ var drag = {
|
|
|
19019
19221
|
var maxX = Math.max(sx, mx);
|
|
19020
19222
|
var minY = isSelectionGrouped ? state.margin.top : Math.min(sy, my);
|
|
19021
19223
|
var maxY = isSelectionGrouped ? state.height : Math.max(sy, my);
|
|
19022
|
-
main.select(".".concat(
|
|
19224
|
+
main.select(".".concat($DRAG.dragarea))
|
|
19023
19225
|
.attr("x", minX)
|
|
19024
19226
|
.attr("y", minY)
|
|
19025
19227
|
.attr("width", maxX - minX)
|
|
19026
19228
|
.attr("height", maxY - minY);
|
|
19027
19229
|
// TODO: binary search when multiple xs
|
|
19028
|
-
main.selectAll(".".concat(
|
|
19029
|
-
.selectAll(".".concat(
|
|
19230
|
+
main.selectAll(".".concat($SHAPE.shapes))
|
|
19231
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
19030
19232
|
.filter(function (d) { return isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind($$.api)(d); })
|
|
19031
19233
|
.each(function (d, i) {
|
|
19032
19234
|
var shape = select(this);
|
|
19033
|
-
var isSelected = shape.classed(
|
|
19034
|
-
var isIncluded = shape.classed(
|
|
19235
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
19236
|
+
var isIncluded = shape.classed($DRAG.INCLUDED);
|
|
19035
19237
|
var isWithin = false;
|
|
19036
19238
|
var toggle;
|
|
19037
|
-
if (shape.classed(
|
|
19239
|
+
if (shape.classed($CIRCLE.circle)) {
|
|
19038
19240
|
var x = +shape.attr("cx") * 1;
|
|
19039
19241
|
var y = +shape.attr("cy") * 1;
|
|
19040
19242
|
toggle = $$.togglePoint;
|
|
19041
19243
|
isWithin = minX < x && x < maxX && minY < y && y < maxY;
|
|
19042
19244
|
}
|
|
19043
|
-
else if (shape.classed(
|
|
19245
|
+
else if (shape.classed($BAR.bar)) {
|
|
19044
19246
|
var _a = getPathBox(this), x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
19045
19247
|
toggle = $$.togglePath;
|
|
19046
19248
|
isWithin = !(maxX < x || x + width < minX) && !(maxY < y || y + height < minY);
|
|
@@ -19051,9 +19253,9 @@ var drag = {
|
|
|
19051
19253
|
}
|
|
19052
19254
|
// @ts-ignore
|
|
19053
19255
|
if (isWithin ^ isIncluded) {
|
|
19054
|
-
shape.classed(
|
|
19256
|
+
shape.classed($DRAG.INCLUDED, !isIncluded);
|
|
19055
19257
|
// TODO: included/unincluded callback here
|
|
19056
|
-
shape.classed(
|
|
19258
|
+
shape.classed($SELECT.SELECTED, !isSelected);
|
|
19057
19259
|
toggle.call($$, !isSelected, shape, d, i);
|
|
19058
19260
|
}
|
|
19059
19261
|
});
|
|
@@ -19071,9 +19273,9 @@ var drag = {
|
|
|
19071
19273
|
return;
|
|
19072
19274
|
}
|
|
19073
19275
|
state.dragStart = mouse;
|
|
19074
|
-
main.select(".".concat(
|
|
19276
|
+
main.select(".".concat($COMMON.chart))
|
|
19075
19277
|
.append("rect")
|
|
19076
|
-
.attr("class",
|
|
19278
|
+
.attr("class", $DRAG.dragarea)
|
|
19077
19279
|
.style("opacity", "0.1");
|
|
19078
19280
|
$$.setDragStatus(true);
|
|
19079
19281
|
},
|
|
@@ -19088,11 +19290,11 @@ var drag = {
|
|
|
19088
19290
|
if ($$.hasArcType() || !config.data_selection_enabled) { // do nothing if not selectable
|
|
19089
19291
|
return;
|
|
19090
19292
|
}
|
|
19091
|
-
$T(main.select(".".concat(
|
|
19293
|
+
$T(main.select(".".concat($DRAG.dragarea)))
|
|
19092
19294
|
.style("opacity", "0")
|
|
19093
19295
|
.remove();
|
|
19094
|
-
main.selectAll(".".concat(
|
|
19095
|
-
.classed(
|
|
19296
|
+
main.selectAll(".".concat($SHAPE.shape))
|
|
19297
|
+
.classed($DRAG.INCLUDED, false);
|
|
19096
19298
|
$$.setDragStatus(false);
|
|
19097
19299
|
}
|
|
19098
19300
|
};
|
|
@@ -19114,12 +19316,12 @@ var selection = _assign(_assign({}, drag), {
|
|
|
19114
19316
|
var r = $$.pointSelectR.bind($$);
|
|
19115
19317
|
callFn(config.data_onselected, $$.api, d, target.node());
|
|
19116
19318
|
// add selected-circle on low layer g
|
|
19117
|
-
$T(main.select(".".concat(
|
|
19118
|
-
.selectAll(".".concat(
|
|
19319
|
+
$T(main.select(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
|
|
19320
|
+
.selectAll(".".concat($SELECT.selectedCircle, "-").concat(i))
|
|
19119
19321
|
.data([d])
|
|
19120
19322
|
.enter()
|
|
19121
19323
|
.append("circle")
|
|
19122
|
-
.attr("class", function () { return $$.generateClass(
|
|
19324
|
+
.attr("class", function () { return $$.generateClass($SELECT.selectedCircle, i); })
|
|
19123
19325
|
.attr("cx", cx)
|
|
19124
19326
|
.attr("cy", cy)
|
|
19125
19327
|
.attr("stroke", $$.color)
|
|
@@ -19137,8 +19339,8 @@ var selection = _assign(_assign({}, drag), {
|
|
|
19137
19339
|
var config = $$.config, main = $$.$el.main, $T = $$.$T;
|
|
19138
19340
|
callFn(config.data_onunselected, $$.api, d, target.node());
|
|
19139
19341
|
// remove selected-circle from low layer g
|
|
19140
|
-
$T(main.select(".".concat(
|
|
19141
|
-
.selectAll(".".concat(
|
|
19342
|
+
$T(main.select(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
|
|
19343
|
+
.selectAll(".".concat($SELECT.selectedCircle, "-").concat(i)))
|
|
19142
19344
|
.attr("r", 0)
|
|
19143
19345
|
.remove();
|
|
19144
19346
|
},
|
|
@@ -19217,29 +19419,29 @@ var selection = _assign(_assign({}, drag), {
|
|
|
19217
19419
|
toggleShape: function (that, d, i) {
|
|
19218
19420
|
var $$ = this;
|
|
19219
19421
|
var config = $$.config, main = $$.$el.main;
|
|
19220
|
-
var shape = select(that);
|
|
19221
|
-
var isSelected = shape.classed(CLASS.SELECTED);
|
|
19222
|
-
var toggle = $$.getToggle(that, d).bind($$);
|
|
19223
|
-
var toggledShape;
|
|
19224
19422
|
if (config.data_selection_enabled && config.data_selection_isselectable.bind($$.api)(d)) {
|
|
19423
|
+
var shape = select(that);
|
|
19424
|
+
var isSelected = shape.classed($SELECT.SELECTED);
|
|
19425
|
+
var toggle_1 = $$.getToggle(that, d).bind($$);
|
|
19426
|
+
var toggledShape_1;
|
|
19225
19427
|
if (!config.data_selection_multiple) {
|
|
19226
|
-
var selector = ".".concat(
|
|
19428
|
+
var selector = ".".concat($SHAPE.shapes);
|
|
19227
19429
|
if (config.data_selection_grouped) {
|
|
19228
19430
|
selector += $$.getTargetSelectorSuffix(d.id);
|
|
19229
19431
|
}
|
|
19230
19432
|
main.selectAll(selector)
|
|
19231
|
-
.selectAll(".".concat(
|
|
19433
|
+
.selectAll(".".concat($SHAPE.shape))
|
|
19232
19434
|
.each(function (d, i) {
|
|
19233
19435
|
var shape = select(this);
|
|
19234
|
-
if (shape.classed(
|
|
19235
|
-
|
|
19236
|
-
|
|
19436
|
+
if (shape.classed($SELECT.SELECTED)) {
|
|
19437
|
+
toggledShape_1 = shape;
|
|
19438
|
+
toggle_1(false, shape.classed($SELECT.SELECTED, false), d, i);
|
|
19237
19439
|
}
|
|
19238
19440
|
});
|
|
19239
19441
|
}
|
|
19240
|
-
if (!
|
|
19241
|
-
shape.classed(
|
|
19242
|
-
|
|
19442
|
+
if (!toggledShape_1 || toggledShape_1.node() !== shape.node()) {
|
|
19443
|
+
shape.classed($SELECT.SELECTED, !isSelected);
|
|
19444
|
+
toggle_1(!isSelected, shape, d, i);
|
|
19243
19445
|
}
|
|
19244
19446
|
}
|
|
19245
19447
|
} });
|
|
@@ -19804,7 +20006,7 @@ var zoom = {
|
|
|
19804
20006
|
if (!zoomRect) {
|
|
19805
20007
|
zoomRect = $$.$el.main.append("rect")
|
|
19806
20008
|
.attr("clip-path", state.clip.path)
|
|
19807
|
-
.attr("class",
|
|
20009
|
+
.attr("class", $ZOOM.zoomBrush)
|
|
19808
20010
|
.attr("width", isRotated ? state.width : 0)
|
|
19809
20011
|
.attr("height", isRotated ? 0 : state.height);
|
|
19810
20012
|
}
|
|
@@ -19848,13 +20050,13 @@ var zoom = {
|
|
|
19848
20050
|
if (resetButton && config.zoom_type === "drag") {
|
|
19849
20051
|
if (!$el.zoomResetBtn) {
|
|
19850
20052
|
$el.zoomResetBtn = $$.$el.chart.append("div")
|
|
19851
|
-
.classed(
|
|
20053
|
+
.classed($COMMON.button, true)
|
|
19852
20054
|
.append("span")
|
|
19853
20055
|
.on("click", function () {
|
|
19854
20056
|
isFunction(resetButton.onclick) && resetButton.onclick.bind($$.api)(this);
|
|
19855
20057
|
$$.api.unzoom();
|
|
19856
20058
|
})
|
|
19857
|
-
.classed(
|
|
20059
|
+
.classed($ZOOM.buttonZoomReset, true)
|
|
19858
20060
|
.text(resetButton.text || "Reset Zoom");
|
|
19859
20061
|
}
|
|
19860
20062
|
else {
|
|
@@ -20185,7 +20387,7 @@ var zoomModule = function () {
|
|
|
20185
20387
|
var defaults = {};
|
|
20186
20388
|
/**
|
|
20187
20389
|
* @namespace bb
|
|
20188
|
-
* @version 3.3.
|
|
20390
|
+
* @version 3.3.2
|
|
20189
20391
|
*/
|
|
20190
20392
|
var bb = {
|
|
20191
20393
|
/**
|
|
@@ -20195,7 +20397,7 @@ var bb = {
|
|
|
20195
20397
|
* bb.version; // "1.0.0"
|
|
20196
20398
|
* @memberof bb
|
|
20197
20399
|
*/
|
|
20198
|
-
version: "3.3.
|
|
20400
|
+
version: "3.3.2",
|
|
20199
20401
|
/**
|
|
20200
20402
|
* Generate chart
|
|
20201
20403
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|