billboard.js 3.3.0 → 3.3.1
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 +424 -374
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2284 -2200
- package/dist/billboard.pkgd.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +137 -92
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +138 -93
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +3 -119
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +3 -119
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +1862 -1828
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +1998 -1919
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2000 -1921
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +1866 -1948
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +1866 -1948
- 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 +426 -383
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -4
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +129 -77
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +135 -80
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -7
- package/package.json +15 -15
- 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 +3 -3
- package/src/ChartInternal/Axis/Axis.ts +13 -12
- package/src/ChartInternal/ChartInternal.ts +5 -6
- package/src/ChartInternal/data/data.ts +3 -3
- package/src/ChartInternal/data/load.ts +2 -2
- package/src/ChartInternal/interactions/drag.ts +15 -15
- package/src/ChartInternal/interactions/eventrect.ts +18 -18
- package/src/ChartInternal/interactions/interaction.ts +10 -10
- package/src/ChartInternal/interactions/zoom.ts +4 -4
- package/src/ChartInternal/internals/color.ts +4 -4
- package/src/ChartInternal/internals/domain.ts +1 -1
- package/src/ChartInternal/internals/grid.ts +32 -32
- package/src/ChartInternal/internals/legend.ts +27 -27
- package/src/ChartInternal/internals/redraw.ts +3 -3
- package/src/ChartInternal/internals/region.ts +3 -3
- package/src/ChartInternal/internals/selection.ts +16 -15
- package/src/ChartInternal/internals/size.ts +3 -3
- package/src/ChartInternal/internals/text.ts +8 -8
- package/src/ChartInternal/internals/title.ts +4 -4
- package/src/ChartInternal/internals/tooltip.ts +5 -5
- package/src/ChartInternal/internals/transform.ts +5 -5
- package/src/ChartInternal/shape/arc.ts +22 -22
- package/src/ChartInternal/shape/area.ts +4 -4
- package/src/ChartInternal/shape/bar.ts +7 -7
- package/src/ChartInternal/shape/candlestick.ts +8 -8
- package/src/ChartInternal/shape/gauge.ts +8 -8
- package/src/ChartInternal/shape/line.ts +7 -7
- package/src/ChartInternal/shape/point.ts +18 -18
- package/src/ChartInternal/shape/radar.ts +10 -10
- package/src/ChartInternal/shape/shape.ts +4 -2
- package/src/Plugin/sparkline/index.ts +2 -2
- package/src/Plugin/stanford/index.ts +3 -3
- package/src/Plugin/stanford/util.ts +0 -1
- package/src/config/classes.ts +154 -66
- package/src/module/util.ts +1 -2
package/dist/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.1
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -314,121 +314,6 @@ function _defineProperty(obj, key, value) {
|
|
|
314
314
|
}
|
|
315
315
|
// EXTERNAL MODULE: external {"commonjs":"d3-brush","commonjs2":"d3-brush","amd":"d3-brush","root":"d3"}
|
|
316
316
|
var external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webpack_require__(3);
|
|
317
|
-
;// CONCATENATED MODULE: ./src/config/classes.ts
|
|
318
|
-
/**
|
|
319
|
-
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
320
|
-
* billboard.js project is licensed under the MIT license
|
|
321
|
-
*/
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* CSS class names definition
|
|
325
|
-
* @private
|
|
326
|
-
*/
|
|
327
|
-
/* harmony default export */ var config_classes = ({
|
|
328
|
-
arc: "bb-arc",
|
|
329
|
-
arcLabelLine: "bb-arc-label-line",
|
|
330
|
-
arcs: "bb-arcs",
|
|
331
|
-
area: "bb-area",
|
|
332
|
-
areas: "bb-areas",
|
|
333
|
-
axis: "bb-axis",
|
|
334
|
-
axisX: "bb-axis-x",
|
|
335
|
-
axisXLabel: "bb-axis-x-label",
|
|
336
|
-
axisY: "bb-axis-y",
|
|
337
|
-
axisY2: "bb-axis-y2",
|
|
338
|
-
axisY2Label: "bb-axis-y2-label",
|
|
339
|
-
axisYLabel: "bb-axis-y-label",
|
|
340
|
-
bar: "bb-bar",
|
|
341
|
-
bars: "bb-bars",
|
|
342
|
-
brush: "bb-brush",
|
|
343
|
-
button: "bb-button",
|
|
344
|
-
buttonZoomReset: "bb-zoom-reset",
|
|
345
|
-
candlestick: "bb-candlestick",
|
|
346
|
-
candlesticks: "bb-candlesticks",
|
|
347
|
-
chart: "bb-chart",
|
|
348
|
-
chartArc: "bb-chart-arc",
|
|
349
|
-
chartArcs: "bb-chart-arcs",
|
|
350
|
-
chartArcsBackground: "bb-chart-arcs-background",
|
|
351
|
-
chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
|
|
352
|
-
chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
|
|
353
|
-
chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
|
|
354
|
-
chartArcsTitle: "bb-chart-arcs-title",
|
|
355
|
-
chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
|
|
356
|
-
chartBar: "bb-chart-bar",
|
|
357
|
-
chartBars: "bb-chart-bars",
|
|
358
|
-
chartCandlestick: "bb-chart-candlestick",
|
|
359
|
-
chartCandlesticks: "bb-chart-candlesticks",
|
|
360
|
-
chartCircles: "bb-chart-circles",
|
|
361
|
-
chartLine: "bb-chart-line",
|
|
362
|
-
chartLines: "bb-chart-lines",
|
|
363
|
-
chartRadar: "bb-chart-radar",
|
|
364
|
-
chartRadars: "bb-chart-radars",
|
|
365
|
-
chartText: "bb-chart-text",
|
|
366
|
-
chartTexts: "bb-chart-texts",
|
|
367
|
-
circle: "bb-circle",
|
|
368
|
-
circles: "bb-circles",
|
|
369
|
-
colorPattern: "bb-color-pattern",
|
|
370
|
-
colorScale: "bb-colorscale",
|
|
371
|
-
defocused: "bb-defocused",
|
|
372
|
-
dragarea: "bb-dragarea",
|
|
373
|
-
empty: "bb-empty",
|
|
374
|
-
eventRect: "bb-event-rect",
|
|
375
|
-
eventRects: "bb-event-rects",
|
|
376
|
-
eventRectsMultiple: "bb-event-rects-multiple",
|
|
377
|
-
eventRectsSingle: "bb-event-rects-single",
|
|
378
|
-
focused: "bb-focused",
|
|
379
|
-
gaugeValue: "bb-gauge-value",
|
|
380
|
-
grid: "bb-grid",
|
|
381
|
-
gridLines: "bb-grid-lines",
|
|
382
|
-
legend: "bb-legend",
|
|
383
|
-
legendBackground: "bb-legend-background",
|
|
384
|
-
legendItem: "bb-legend-item",
|
|
385
|
-
legendItemEvent: "bb-legend-item-event",
|
|
386
|
-
legendItemFocused: "bb-legend-item-focused",
|
|
387
|
-
legendItemHidden: "bb-legend-item-hidden",
|
|
388
|
-
legendItemPoint: "bb-legend-item-point",
|
|
389
|
-
legendItemTile: "bb-legend-item-tile",
|
|
390
|
-
level: "bb-level",
|
|
391
|
-
levels: "bb-levels",
|
|
392
|
-
line: "bb-line",
|
|
393
|
-
lines: "bb-lines",
|
|
394
|
-
main: "bb-main",
|
|
395
|
-
region: "bb-region",
|
|
396
|
-
regions: "bb-regions",
|
|
397
|
-
selectedCircle: "bb-selected-circle",
|
|
398
|
-
selectedCircles: "bb-selected-circles",
|
|
399
|
-
shape: "bb-shape",
|
|
400
|
-
shapes: "bb-shapes",
|
|
401
|
-
stanfordElements: "bb-stanford-elements",
|
|
402
|
-
stanfordLine: "bb-stanford-line",
|
|
403
|
-
stanfordLines: "bb-stanford-lines",
|
|
404
|
-
stanfordRegion: "bb-stanford-region",
|
|
405
|
-
stanfordRegions: "bb-stanford-regions",
|
|
406
|
-
subchart: "bb-subchart",
|
|
407
|
-
target: "bb-target",
|
|
408
|
-
text: "bb-text",
|
|
409
|
-
texts: "bb-texts",
|
|
410
|
-
title: "bb-title",
|
|
411
|
-
tooltip: "bb-tooltip",
|
|
412
|
-
tooltipContainer: "bb-tooltip-container",
|
|
413
|
-
tooltipName: "bb-tooltip-name",
|
|
414
|
-
valueDown: "bb-value-down",
|
|
415
|
-
valueUp: "bb-value-up",
|
|
416
|
-
xgrid: "bb-xgrid",
|
|
417
|
-
xgridFocus: "bb-xgrid-focus",
|
|
418
|
-
xgridLine: "bb-xgrid-line",
|
|
419
|
-
xgridLines: "bb-xgrid-lines",
|
|
420
|
-
xgrids: "bb-xgrids",
|
|
421
|
-
ygrid: "bb-ygrid",
|
|
422
|
-
ygridFocus: "bb-ygrid-focus",
|
|
423
|
-
ygridLine: "bb-ygrid-line",
|
|
424
|
-
ygridLines: "bb-ygrid-lines",
|
|
425
|
-
ygrids: "bb-ygrids",
|
|
426
|
-
zoomBrush: "bb-zoom-brush",
|
|
427
|
-
EXPANDED: "_expanded_",
|
|
428
|
-
SELECTED: "_selected_",
|
|
429
|
-
INCLUDED: "_included_",
|
|
430
|
-
TextOverlapping: "text-overlapping"
|
|
431
|
-
});
|
|
432
317
|
;// CONCATENATED MODULE: ./src/module/util.ts
|
|
433
318
|
|
|
434
319
|
|
|
@@ -446,7 +331,6 @@ function _objectSpread(target) { for (var i = 1, source; i < arguments.length; i
|
|
|
446
331
|
|
|
447
332
|
|
|
448
333
|
|
|
449
|
-
|
|
450
334
|
var isValue = function (v) {
|
|
451
335
|
return v || v === 0;
|
|
452
336
|
},
|
|
@@ -717,7 +601,7 @@ function getBrushSelection(ctx) {
|
|
|
717
601
|
// check from event
|
|
718
602
|
if (event && event.type === "brush") {
|
|
719
603
|
selection = event.selection; // check from brush area selection
|
|
720
|
-
} else if (main && (selection = main.select("."
|
|
604
|
+
} else if (main && (selection = main.select(".bb-brush").node())) {
|
|
721
605
|
selection = (0,external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_.brushSelection)(selection);
|
|
722
606
|
}
|
|
723
607
|
|
|
@@ -1295,6 +1179,167 @@ function logError(head, tail) {
|
|
|
1295
1179
|
|
|
1296
1180
|
throw Error(prefix + " " + head.replace(/\%c([a-z-]+)/i, "'$1' ") + " " + tail);
|
|
1297
1181
|
}
|
|
1182
|
+
;// CONCATENATED MODULE: ./src/config/classes.ts
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
function classes_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1186
|
+
|
|
1187
|
+
function classes_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? classes_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : classes_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
1191
|
+
* billboard.js project is licensed under the MIT license
|
|
1192
|
+
*/
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* CSS class names definition
|
|
1196
|
+
* @private
|
|
1197
|
+
*/
|
|
1198
|
+
var $COMMON = {
|
|
1199
|
+
button: "bb-button",
|
|
1200
|
+
chart: "bb-chart",
|
|
1201
|
+
empty: "bb-empty",
|
|
1202
|
+
main: "bb-main",
|
|
1203
|
+
target: "bb-target",
|
|
1204
|
+
EXPANDED: "_expanded_"
|
|
1205
|
+
};
|
|
1206
|
+
var $ARC = {
|
|
1207
|
+
arc: "bb-arc",
|
|
1208
|
+
arcLabelLine: "bb-arc-label-line",
|
|
1209
|
+
arcs: "bb-arcs",
|
|
1210
|
+
chartArc: "bb-chart-arc",
|
|
1211
|
+
chartArcs: "bb-chart-arcs",
|
|
1212
|
+
chartArcsBackground: "bb-chart-arcs-background",
|
|
1213
|
+
chartArcsTitle: "bb-chart-arcs-title"
|
|
1214
|
+
};
|
|
1215
|
+
var $AREA = {
|
|
1216
|
+
area: "bb-area",
|
|
1217
|
+
areas: "bb-areas"
|
|
1218
|
+
};
|
|
1219
|
+
var $AXIS = {
|
|
1220
|
+
axis: "bb-axis",
|
|
1221
|
+
axisX: "bb-axis-x",
|
|
1222
|
+
axisXLabel: "bb-axis-x-label",
|
|
1223
|
+
axisY: "bb-axis-y",
|
|
1224
|
+
axisY2: "bb-axis-y2",
|
|
1225
|
+
axisY2Label: "bb-axis-y2-label",
|
|
1226
|
+
axisYLabel: "bb-axis-y-label"
|
|
1227
|
+
};
|
|
1228
|
+
var $BAR = {
|
|
1229
|
+
bar: "bb-bar",
|
|
1230
|
+
bars: "bb-bars",
|
|
1231
|
+
chartBar: "bb-chart-bar",
|
|
1232
|
+
chartBars: "bb-chart-bars"
|
|
1233
|
+
};
|
|
1234
|
+
var $CANDLESTICK = {
|
|
1235
|
+
candlestick: "bb-candlestick",
|
|
1236
|
+
candlesticks: "bb-candlesticks",
|
|
1237
|
+
chartCandlestick: "bb-chart-candlestick",
|
|
1238
|
+
chartCandlesticks: "bb-chart-candlesticks",
|
|
1239
|
+
valueDown: "bb-value-down",
|
|
1240
|
+
valueUp: "bb-value-up"
|
|
1241
|
+
};
|
|
1242
|
+
var $CIRCLE = {
|
|
1243
|
+
chartCircles: "bb-chart-circles",
|
|
1244
|
+
circle: "bb-circle",
|
|
1245
|
+
circles: "bb-circles"
|
|
1246
|
+
};
|
|
1247
|
+
var $COLOR = {
|
|
1248
|
+
colorPattern: "bb-color-pattern",
|
|
1249
|
+
colorScale: "bb-colorscale"
|
|
1250
|
+
};
|
|
1251
|
+
var $DRAG = {
|
|
1252
|
+
dragarea: "bb-dragarea",
|
|
1253
|
+
INCLUDED: "_included_"
|
|
1254
|
+
};
|
|
1255
|
+
var $GAUGE = {
|
|
1256
|
+
chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
|
|
1257
|
+
chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
|
|
1258
|
+
chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
|
|
1259
|
+
chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
|
|
1260
|
+
gaugeValue: "bb-gauge-value"
|
|
1261
|
+
};
|
|
1262
|
+
var $LEGEND = {
|
|
1263
|
+
legend: "bb-legend",
|
|
1264
|
+
legendBackground: "bb-legend-background",
|
|
1265
|
+
legendItem: "bb-legend-item",
|
|
1266
|
+
legendItemEvent: "bb-legend-item-event",
|
|
1267
|
+
legendItemHidden: "bb-legend-item-hidden",
|
|
1268
|
+
legendItemPoint: "bb-legend-item-point",
|
|
1269
|
+
legendItemTile: "bb-legend-item-tile"
|
|
1270
|
+
};
|
|
1271
|
+
var $LINE = {
|
|
1272
|
+
chartLine: "bb-chart-line",
|
|
1273
|
+
chartLines: "bb-chart-lines",
|
|
1274
|
+
line: "bb-line",
|
|
1275
|
+
lines: "bb-lines"
|
|
1276
|
+
};
|
|
1277
|
+
var $EVENT = {
|
|
1278
|
+
eventRect: "bb-event-rect",
|
|
1279
|
+
eventRects: "bb-event-rects",
|
|
1280
|
+
eventRectsMultiple: "bb-event-rects-multiple",
|
|
1281
|
+
eventRectsSingle: "bb-event-rects-single"
|
|
1282
|
+
};
|
|
1283
|
+
var $FOCUS = {
|
|
1284
|
+
focused: "bb-focused",
|
|
1285
|
+
defocused: "bb-defocused",
|
|
1286
|
+
legendItemFocused: "bb-legend-item-focused",
|
|
1287
|
+
xgridFocus: "bb-xgrid-focus",
|
|
1288
|
+
ygridFocus: "bb-ygrid-focus"
|
|
1289
|
+
};
|
|
1290
|
+
var $GRID = {
|
|
1291
|
+
grid: "bb-grid",
|
|
1292
|
+
gridLines: "bb-grid-lines",
|
|
1293
|
+
xgrid: "bb-xgrid",
|
|
1294
|
+
xgridLine: "bb-xgrid-line",
|
|
1295
|
+
xgridLines: "bb-xgrid-lines",
|
|
1296
|
+
xgrids: "bb-xgrids",
|
|
1297
|
+
ygrid: "bb-ygrid",
|
|
1298
|
+
ygridLine: "bb-ygrid-line",
|
|
1299
|
+
ygridLines: "bb-ygrid-lines",
|
|
1300
|
+
ygrids: "bb-ygrids"
|
|
1301
|
+
};
|
|
1302
|
+
var $RADAR = {
|
|
1303
|
+
chartRadar: "bb-chart-radar",
|
|
1304
|
+
chartRadars: "bb-chart-radars",
|
|
1305
|
+
level: "bb-level",
|
|
1306
|
+
levels: "bb-levels"
|
|
1307
|
+
};
|
|
1308
|
+
var $REGION = {
|
|
1309
|
+
region: "bb-region",
|
|
1310
|
+
regions: "bb-regions"
|
|
1311
|
+
};
|
|
1312
|
+
var $SELECT = {
|
|
1313
|
+
selectedCircle: "bb-selected-circle",
|
|
1314
|
+
selectedCircles: "bb-selected-circles",
|
|
1315
|
+
SELECTED: "_selected_"
|
|
1316
|
+
};
|
|
1317
|
+
var $SHAPE = {
|
|
1318
|
+
shape: "bb-shape",
|
|
1319
|
+
shapes: "bb-shapes"
|
|
1320
|
+
};
|
|
1321
|
+
var $SUBCHART = {
|
|
1322
|
+
brush: "bb-brush",
|
|
1323
|
+
subchart: "bb-subchart"
|
|
1324
|
+
};
|
|
1325
|
+
var $TEXT = {
|
|
1326
|
+
chartText: "bb-chart-text",
|
|
1327
|
+
chartTexts: "bb-chart-texts",
|
|
1328
|
+
text: "bb-text",
|
|
1329
|
+
texts: "bb-texts",
|
|
1330
|
+
title: "bb-title",
|
|
1331
|
+
TextOverlapping: "text-overlapping"
|
|
1332
|
+
};
|
|
1333
|
+
var $TOOLTIP = {
|
|
1334
|
+
tooltip: "bb-tooltip",
|
|
1335
|
+
tooltipContainer: "bb-tooltip-container",
|
|
1336
|
+
tooltipName: "bb-tooltip-name"
|
|
1337
|
+
};
|
|
1338
|
+
var $ZOOM = {
|
|
1339
|
+
buttonZoomReset: "bb-zoom-reset",
|
|
1340
|
+
zoomBrush: "bb-zoom-brush"
|
|
1341
|
+
};
|
|
1342
|
+
/* harmony default export */ var classes = (classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM));
|
|
1298
1343
|
;// CONCATENATED MODULE: ./src/config/Store/Element.ts
|
|
1299
1344
|
/**
|
|
1300
1345
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -1543,7 +1588,7 @@ var State = function () {
|
|
|
1543
1588
|
|
|
1544
1589
|
// mapping
|
|
1545
1590
|
|
|
1546
|
-
var
|
|
1591
|
+
var Store_classes = {
|
|
1547
1592
|
element: Element,
|
|
1548
1593
|
state: State
|
|
1549
1594
|
};
|
|
@@ -1558,8 +1603,8 @@ var Store = /*#__PURE__*/function () {
|
|
|
1558
1603
|
function Store() {
|
|
1559
1604
|
var _this = this;
|
|
1560
1605
|
|
|
1561
|
-
Object.keys(
|
|
1562
|
-
_this[v] = new
|
|
1606
|
+
Object.keys(Store_classes).forEach(function (v) {
|
|
1607
|
+
_this[v] = new Store_classes[v]();
|
|
1563
1608
|
});
|
|
1564
1609
|
}
|
|
1565
1610
|
|
|
@@ -4615,7 +4660,7 @@ var external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_ = __webpack_re
|
|
|
4615
4660
|
data.filter(function (v) {
|
|
4616
4661
|
return $$.isBarType(v.id) || $$.isCandlestickType(v.id);
|
|
4617
4662
|
}).forEach(function (v) {
|
|
4618
|
-
var selector = $$.isBarType(v.id) ? "." +
|
|
4663
|
+
var selector = $$.isBarType(v.id) ? "." + $BAR.chartBar + "." + $COMMON.target + $$.getTargetSelectorSuffix(v.id) + " ." + $BAR.bar + "-" + v.index : "." + $CANDLESTICK.chartCandlestick + "." + $COMMON.target + $$.getTargetSelectorSuffix(v.id) + " ." + $CANDLESTICK.candlestick + "-" + v.index + " path";
|
|
4619
4664
|
|
|
4620
4665
|
if (!closest && $$.isWithinBar(main.select(selector).node())) {
|
|
4621
4666
|
closest = v;
|
|
@@ -4986,7 +5031,7 @@ var external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_ = __webpack_re
|
|
|
4986
5031
|
state.withoutFadeIn[id] = !1; // Remove target's elements
|
|
4987
5032
|
|
|
4988
5033
|
if ($el.legend) {
|
|
4989
|
-
$el.legend.selectAll("." +
|
|
5034
|
+
$el.legend.selectAll("." + $LEGEND.legendItem + $$.getTargetSelectorSuffix(id)).remove();
|
|
4990
5035
|
} // Remove target
|
|
4991
5036
|
|
|
4992
5037
|
|
|
@@ -5030,8 +5075,8 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5030
5075
|
}
|
|
5031
5076
|
}
|
|
5032
5077
|
|
|
5033
|
-
main.selectAll("." +
|
|
5034
|
-
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(
|
|
5078
|
+
main.selectAll("." + $SHAPE.shape + "-" + index).each(function () {
|
|
5079
|
+
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($COMMON.EXPANDED, !0);
|
|
5035
5080
|
|
|
5036
5081
|
if (isSelectionEnabled) {
|
|
5037
5082
|
eventRect.style("cursor", isSelectionGrouped ? "pointer" : null);
|
|
@@ -5096,8 +5141,8 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5096
5141
|
["bar", "candlestick"].filter(function (v) {
|
|
5097
5142
|
return $$.$el[v];
|
|
5098
5143
|
}).forEach(function (v) {
|
|
5099
|
-
reset && $$.$el[v].classed(
|
|
5100
|
-
$$.getShapeByIndex(v, i, id).classed(
|
|
5144
|
+
reset && $$.$el[v].classed($COMMON.EXPANDED, !1);
|
|
5145
|
+
$$.getShapeByIndex(v, i, id).classed($COMMON.EXPANDED, expand);
|
|
5101
5146
|
});
|
|
5102
5147
|
},
|
|
5103
5148
|
|
|
@@ -5120,10 +5165,10 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5120
5165
|
config.color_onover && $$.setOverColor(isOver, d, isArc);
|
|
5121
5166
|
|
|
5122
5167
|
if (isArc) {
|
|
5123
|
-
callback(d, main.select("." +
|
|
5168
|
+
callback(d, main.select("." + $ARC.arc + $$.getTargetSelectorSuffix(d.id)).node());
|
|
5124
5169
|
} else if (!config.tooltip_grouped) {
|
|
5125
5170
|
var last = $$.cache.get(KEY.setOverOut) || [],
|
|
5126
|
-
shape = main.selectAll("." +
|
|
5171
|
+
shape = main.selectAll("." + $SHAPE.shape + "-" + d).filter(function (d) {
|
|
5127
5172
|
return $$.isWithinShape(this, d);
|
|
5128
5173
|
});
|
|
5129
5174
|
shape.each(function (d) {
|
|
@@ -5151,7 +5196,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5151
5196
|
config.point_focus_only && hasRadar ? $$.showCircleFocus($$.getAllValuesOnIndex(d, !0)) : $$.setExpand(d, null, !0);
|
|
5152
5197
|
}
|
|
5153
5198
|
|
|
5154
|
-
$$.isMultipleX() || main.selectAll("." +
|
|
5199
|
+
$$.isMultipleX() || main.selectAll("." + $SHAPE.shape + "-" + d).each(function (d) {
|
|
5155
5200
|
callback(d, this);
|
|
5156
5201
|
});
|
|
5157
5202
|
}
|
|
@@ -5214,7 +5259,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5214
5259
|
arcs = _$$$$el.arcs,
|
|
5215
5260
|
radar = _$$$$el.radar,
|
|
5216
5261
|
isMultipleX = $$.isMultipleX(),
|
|
5217
|
-
element = (hasRadar ? radar.axes.select("." +
|
|
5262
|
+
element = (hasRadar ? radar.axes.select("." + $AXIS.axis + "-" + index + " text") : eventRect || arcs.selectAll("." + $COMMON.target + " path").filter(function (d, i) {
|
|
5218
5263
|
return i === index;
|
|
5219
5264
|
})).node(),
|
|
5220
5265
|
_element$getBoundingC = element.getBoundingClientRect(),
|
|
@@ -5309,7 +5354,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5309
5354
|
|
|
5310
5355
|
return function (d) {
|
|
5311
5356
|
var data = d.data || d,
|
|
5312
|
-
result = (withShape ? _this.generateClass(
|
|
5357
|
+
result = (withShape ? _this.generateClass(classes[isPlural ? "shapes" : "shape"], data[key]) : "") + _this.generateClass(classes[type], data[useIdKey ? "id" : key]);
|
|
5313
5358
|
|
|
5314
5359
|
return result.trim();
|
|
5315
5360
|
};
|
|
@@ -5325,7 +5370,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5325
5370
|
var _this2 = this;
|
|
5326
5371
|
|
|
5327
5372
|
return function (d) {
|
|
5328
|
-
return
|
|
5373
|
+
return classes["chart" + type] + _this2.classTarget((d.data ? d.data : d).id);
|
|
5329
5374
|
};
|
|
5330
5375
|
},
|
|
5331
5376
|
generateExtraLineClass: function generateExtraLineClass() {
|
|
@@ -5344,26 +5389,26 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5344
5389
|
};
|
|
5345
5390
|
},
|
|
5346
5391
|
classRegion: function classRegion(d, i) {
|
|
5347
|
-
return this.generateClass(
|
|
5392
|
+
return this.generateClass(classes.region, i) + " " + ("class" in d ? d.class : "");
|
|
5348
5393
|
},
|
|
5349
5394
|
classTarget: function classTarget(id) {
|
|
5350
5395
|
var additionalClassSuffix = this.config.data_classes[id],
|
|
5351
5396
|
additionalClass = "";
|
|
5352
5397
|
|
|
5353
5398
|
if (additionalClassSuffix) {
|
|
5354
|
-
additionalClass = " " +
|
|
5399
|
+
additionalClass = " " + classes.target + "-" + additionalClassSuffix;
|
|
5355
5400
|
}
|
|
5356
5401
|
|
|
5357
|
-
return this.generateClass(
|
|
5402
|
+
return this.generateClass(classes.target, id) + additionalClass;
|
|
5358
5403
|
},
|
|
5359
5404
|
classFocus: function classFocus(d) {
|
|
5360
5405
|
return this.classFocused(d) + this.classDefocused(d);
|
|
5361
5406
|
},
|
|
5362
5407
|
classFocused: function classFocused(d) {
|
|
5363
|
-
return " " + (this.state.focusedTargetIds.indexOf(d.id) >= 0 ?
|
|
5408
|
+
return " " + (this.state.focusedTargetIds.indexOf(d.id) >= 0 ? classes.focused : "");
|
|
5364
5409
|
},
|
|
5365
5410
|
classDefocused: function classDefocused(d) {
|
|
5366
|
-
return " " + (this.state.defocusedTargetIds.indexOf(d.id) >= 0 ?
|
|
5411
|
+
return " " + (this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? classes.defocused : "");
|
|
5367
5412
|
},
|
|
5368
5413
|
getTargetSelectorSuffix: function getTargetSelectorSuffix(targetId) {
|
|
5369
5414
|
var targetStr = targetId || targetId === 0 ? "-" + targetId : "";
|
|
@@ -5373,7 +5418,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5373
5418
|
var pfx = prefix || "",
|
|
5374
5419
|
target = this.getTargetSelectorSuffix(id);
|
|
5375
5420
|
// select target & circle
|
|
5376
|
-
return pfx + "." + (
|
|
5421
|
+
return pfx + "." + (classes.target + target) + ", " + pfx + "." + (classes.circles + target);
|
|
5377
5422
|
},
|
|
5378
5423
|
selectorTargets: function selectorTargets(idsValue, prefix) {
|
|
5379
5424
|
var _this3 = this,
|
|
@@ -5384,7 +5429,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5384
5429
|
}) : null;
|
|
5385
5430
|
},
|
|
5386
5431
|
selectorLegend: function selectorLegend(id) {
|
|
5387
|
-
return "." + (
|
|
5432
|
+
return "." + (classes.legendItem + this.getTargetSelectorSuffix(id));
|
|
5388
5433
|
},
|
|
5389
5434
|
selectorLegends: function selectorLegends(ids) {
|
|
5390
5435
|
var _this4 = this;
|
|
@@ -5460,7 +5505,7 @@ var colorizePattern = function (pattern, color, id) {
|
|
|
5460
5505
|
|
|
5461
5506
|
if (!pattern) {
|
|
5462
5507
|
var span = browser_doc.createElement("span");
|
|
5463
|
-
span.className =
|
|
5508
|
+
span.className = $COLOR.colorPattern;
|
|
5464
5509
|
span.style.display = "none";
|
|
5465
5510
|
body.appendChild(span);
|
|
5466
5511
|
var content = win.getComputedStyle(span).backgroundImage;
|
|
@@ -5600,7 +5645,7 @@ var colorizePattern = function (pattern, color, id) {
|
|
|
5600
5645
|
}
|
|
5601
5646
|
|
|
5602
5647
|
main.selectAll(isObject(d) ? // when is Arc type
|
|
5603
|
-
"." +
|
|
5648
|
+
"." + $ARC.arc + $$.getTargetSelectorSuffix(d.id) : "." + $SHAPE.shape + "-" + d).style("fill", color);
|
|
5604
5649
|
}
|
|
5605
5650
|
});
|
|
5606
5651
|
;// CONCATENATED MODULE: ./src/ChartInternal/internals/domain.ts
|
|
@@ -5714,7 +5759,7 @@ var colorizePattern = function (pattern, color, id) {
|
|
|
5714
5759
|
yDomainMax = $$.getYDomainMinMax(yTargets, "max"),
|
|
5715
5760
|
isZeroBased = [TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER].concat(TYPE_BY_CATEGORY.Line).some(function (v) {
|
|
5716
5761
|
var type = v.indexOf("area") > -1 ? "area" : v;
|
|
5717
|
-
return $$.hasType(v, yTargets) && config[type + "_zerobased"];
|
|
5762
|
+
return $$.hasType(v, yTargets, !0) && config[type + "_zerobased"];
|
|
5718
5763
|
});
|
|
5719
5764
|
// MEMO: avoid inverting domain unexpectedly
|
|
5720
5765
|
yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin;
|
|
@@ -6110,7 +6155,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6110
6155
|
|
|
6111
6156
|
if (config.legend_show) {
|
|
6112
6157
|
if (!config.legend_contents_bindto) {
|
|
6113
|
-
$el.legend = $$.$el.svg.append("g").classed(
|
|
6158
|
+
$el.legend = $$.$el.svg.append("g").classed($LEGEND.legend, !0).attr("transform", $$.getTranslate("legend"));
|
|
6114
6159
|
} // MEMO: call here to update legend box and translate for all
|
|
6115
6160
|
// MEMO: translate will be updated by this, so transform not needed in updateLegend()
|
|
6116
6161
|
|
|
@@ -6149,7 +6194,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6149
6194
|
} // toggle legend state
|
|
6150
6195
|
|
|
6151
6196
|
|
|
6152
|
-
$el.legend.selectAll("." +
|
|
6197
|
+
$el.legend.selectAll("." + $LEGEND.legendItem).classed($LEGEND.legendItemHidden, function (id) {
|
|
6153
6198
|
var hide = !$$.isTargetToShow(id);
|
|
6154
6199
|
|
|
6155
6200
|
if (hide) {
|
|
@@ -6277,7 +6322,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6277
6322
|
var legend = this.$el.legend;
|
|
6278
6323
|
|
|
6279
6324
|
if (legend) {
|
|
6280
|
-
legend.select("." +
|
|
6325
|
+
legend.select("." + $LEGEND.legendItem + "-" + id + " line").style("stroke", color);
|
|
6281
6326
|
}
|
|
6282
6327
|
},
|
|
6283
6328
|
|
|
@@ -6319,7 +6364,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6319
6364
|
* @private
|
|
6320
6365
|
*/
|
|
6321
6366
|
opacityForUnfocusedLegend: function opacityForUnfocusedLegend(legendItem) {
|
|
6322
|
-
return legendItem.classed(
|
|
6367
|
+
return legendItem.classed($LEGEND.legendItemHidden) ? null : "0.3";
|
|
6323
6368
|
},
|
|
6324
6369
|
|
|
6325
6370
|
/**
|
|
@@ -6333,9 +6378,9 @@ function getFormat($$, typeValue, v) {
|
|
|
6333
6378
|
legend = $$.$el.legend,
|
|
6334
6379
|
$T = $$.$T,
|
|
6335
6380
|
targetIdz = $$.mapToTargetIds(targetIds);
|
|
6336
|
-
legend && $T(legend.selectAll("." +
|
|
6381
|
+
legend && $T(legend.selectAll("." + $LEGEND.legendItem).filter(function (id) {
|
|
6337
6382
|
return targetIdz.indexOf(id) >= 0;
|
|
6338
|
-
}).classed(
|
|
6383
|
+
}).classed($FOCUS.legendItemFocused, focus)).style("opacity", function () {
|
|
6339
6384
|
return focus ? null : $$.opacityForUnfocusedLegend.call($$, (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this));
|
|
6340
6385
|
});
|
|
6341
6386
|
},
|
|
@@ -6348,7 +6393,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6348
6393
|
var $$ = this,
|
|
6349
6394
|
legend = $$.$el.legend,
|
|
6350
6395
|
$T = $$.$T;
|
|
6351
|
-
legend && $T(legend.selectAll("." +
|
|
6396
|
+
legend && $T(legend.selectAll("." + $LEGEND.legendItem).classed($FOCUS.legendItemFocused, !1)).style("opacity", null);
|
|
6352
6397
|
},
|
|
6353
6398
|
|
|
6354
6399
|
/**
|
|
@@ -6409,7 +6454,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6409
6454
|
data = !state.redrawing && cache.get(cacheKey) || {};
|
|
6410
6455
|
|
|
6411
6456
|
if (!data[id]) {
|
|
6412
|
-
data[id] = $$.getTextRect(textElement,
|
|
6457
|
+
data[id] = $$.getTextRect(textElement, $LEGEND.legendItem);
|
|
6413
6458
|
cache.add(cacheKey, data);
|
|
6414
6459
|
}
|
|
6415
6460
|
|
|
@@ -6434,7 +6479,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6434
6479
|
item.attr("class", function (id) {
|
|
6435
6480
|
var node = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
|
|
6436
6481
|
itemClass = !node.empty() && node.attr("class") || "";
|
|
6437
|
-
return itemClass + $$.generateClass(
|
|
6482
|
+
return itemClass + $$.generateClass($LEGEND.legendItem, id);
|
|
6438
6483
|
}).style("visibility", function (id) {
|
|
6439
6484
|
return $$.isLegendToShow(id) ? null : "hidden";
|
|
6440
6485
|
});
|
|
@@ -6447,7 +6492,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6447
6492
|
api.show(id);
|
|
6448
6493
|
} else {
|
|
6449
6494
|
api.toggle(id);
|
|
6450
|
-
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(
|
|
6495
|
+
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !1);
|
|
6451
6496
|
}
|
|
6452
6497
|
}
|
|
6453
6498
|
|
|
@@ -6455,20 +6500,20 @@ function getFormat($$, typeValue, v) {
|
|
|
6455
6500
|
});
|
|
6456
6501
|
isTouch || item.on("mouseout", function (event, id) {
|
|
6457
6502
|
if (!callFn(config.legend_item_onout, api, id)) {
|
|
6458
|
-
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(
|
|
6503
|
+
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !1);
|
|
6459
6504
|
|
|
6460
6505
|
if (hasGauge) {
|
|
6461
|
-
$$.undoMarkOverlapped($$, "." +
|
|
6506
|
+
$$.undoMarkOverlapped($$, "." + $GAUGE.gaugeValue);
|
|
6462
6507
|
}
|
|
6463
6508
|
|
|
6464
6509
|
$$.api.revert();
|
|
6465
6510
|
}
|
|
6466
6511
|
}).on("mouseover", function (event, id) {
|
|
6467
6512
|
if (!callFn(config.legend_item_onover, api, id)) {
|
|
6468
|
-
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(
|
|
6513
|
+
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !0);
|
|
6469
6514
|
|
|
6470
6515
|
if (hasGauge) {
|
|
6471
|
-
$$.markOverlapped(id, $$, "." +
|
|
6516
|
+
$$.markOverlapped(id, $$, "." + $GAUGE.gaugeValue);
|
|
6472
6517
|
}
|
|
6473
6518
|
|
|
6474
6519
|
if (!state.transiting && $$.isTargetToShow(id)) {
|
|
@@ -6639,7 +6684,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6639
6684
|
return yForLegend(id, i) + 4;
|
|
6640
6685
|
},
|
|
6641
6686
|
pos = -200,
|
|
6642
|
-
l = legend.selectAll("." +
|
|
6687
|
+
l = legend.selectAll("." + $LEGEND.legendItem).data(targetIdz).enter().append("g");
|
|
6643
6688
|
|
|
6644
6689
|
$$.setLegendItem(l);
|
|
6645
6690
|
l.append("text").text(function (id) {
|
|
@@ -6647,7 +6692,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6647
6692
|
}).each(function (id, i) {
|
|
6648
6693
|
updatePositions(this, id, i);
|
|
6649
6694
|
}).style("pointer-events", "none").attr("x", isLegendRightOrInset ? xForLegendText : pos).attr("y", isLegendRightOrInset ? pos : yForLegendText);
|
|
6650
|
-
l.append("rect").attr("class",
|
|
6695
|
+
l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", "0").attr("x", isLegendRightOrInset ? xForLegendRect : pos).attr("y", isLegendRightOrInset ? pos : yForLegendRect);
|
|
6651
6696
|
|
|
6652
6697
|
var getColor = function (id) {
|
|
6653
6698
|
var data = $$.getDataById(id);
|
|
@@ -6667,21 +6712,21 @@ function getFormat($$, typeValue, v) {
|
|
|
6667
6712
|
}
|
|
6668
6713
|
|
|
6669
6714
|
return browser_doc.createElementNS(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.namespaces.svg, "hasValidPointType" in $$ && $$.hasValidPointType(point) ? point : "use");
|
|
6670
|
-
}).attr("class",
|
|
6715
|
+
}).attr("class", $LEGEND.legendItemPoint).style("fill", getColor).style("pointer-events", "none").attr("href", function (data, idx, selection) {
|
|
6671
6716
|
var node = selection[idx],
|
|
6672
6717
|
nodeName = node.nodeName.toLowerCase(),
|
|
6673
6718
|
id = $$.getTargetSelectorSuffix(data);
|
|
6674
6719
|
return nodeName === "use" ? "#" + state.datetimeId + "-point" + id : undefined;
|
|
6675
6720
|
});
|
|
6676
6721
|
} else {
|
|
6677
|
-
l.append("line").attr("class",
|
|
6722
|
+
l.append("line").attr("class", $LEGEND.legendItemTile).style("stroke", getColor).style("pointer-events", "none").attr("x1", isLegendRightOrInset ? x1ForLegendTile : pos).attr("y1", isLegendRightOrInset ? pos : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : pos).attr("y2", isLegendRightOrInset ? pos : yForLegendTile).attr("stroke-width", config.legend_item_tile_height);
|
|
6678
6723
|
} // Set background for inset legend
|
|
6679
6724
|
|
|
6680
6725
|
|
|
6681
|
-
background = legend.select("." +
|
|
6726
|
+
background = legend.select("." + $LEGEND.legendBackground + " rect");
|
|
6682
6727
|
|
|
6683
6728
|
if (state.isLegendInset && maxWidth > 0 && background.size() === 0) {
|
|
6684
|
-
background = legend.insert("g", "." +
|
|
6729
|
+
background = legend.insert("g", "." + $LEGEND.legendItem).attr("class", $LEGEND.legendBackground).append("rect");
|
|
6685
6730
|
}
|
|
6686
6731
|
|
|
6687
6732
|
var texts = legend.selectAll("text").data(targetIdz).text(function (id) {
|
|
@@ -6691,7 +6736,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6691
6736
|
updatePositions(this, id, i);
|
|
6692
6737
|
});
|
|
6693
6738
|
$T(texts, withTransition).attr("x", xForLegendText).attr("y", yForLegendText);
|
|
6694
|
-
var rects = legend.selectAll("rect." +
|
|
6739
|
+
var rects = legend.selectAll("rect." + $LEGEND.legendItemEvent).data(targetIdz);
|
|
6695
6740
|
$T(rects, withTransition).attr("width", function (id) {
|
|
6696
6741
|
return widths[id];
|
|
6697
6742
|
}).attr("height", function (id) {
|
|
@@ -6699,7 +6744,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6699
6744
|
}).attr("x", xForLegendRect).attr("y", yForLegendRect);
|
|
6700
6745
|
|
|
6701
6746
|
if (usePoint) {
|
|
6702
|
-
var tiles = legend.selectAll("." +
|
|
6747
|
+
var tiles = legend.selectAll("." + $LEGEND.legendItemPoint).data(targetIdz);
|
|
6703
6748
|
$T(tiles, withTransition).each(function () {
|
|
6704
6749
|
var nodeName = this.nodeName.toLowerCase(),
|
|
6705
6750
|
pointR = config.point_r,
|
|
@@ -6733,7 +6778,7 @@ function getFormat($$, typeValue, v) {
|
|
|
6733
6778
|
}).attr("r", radius).attr("width", width).attr("height", height);
|
|
6734
6779
|
});
|
|
6735
6780
|
} else {
|
|
6736
|
-
var _tiles = legend.selectAll("line." +
|
|
6781
|
+
var _tiles = legend.selectAll("line." + $LEGEND.legendItemTile).data(targetIdz);
|
|
6737
6782
|
|
|
6738
6783
|
$T(_tiles, withTransition).style("stroke", getColor).attr("x1", x1ForLegendTile).attr("y1", yForLegendTile).attr("x2", x2ForLegendTile).attr("y2", yForLegendTile);
|
|
6739
6784
|
}
|
|
@@ -6803,7 +6848,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
6803
6848
|
// @TODO: Make 'init' state to be accessible everywhere not passing as argument.
|
|
6804
6849
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing); // Data empty label positioning and text.
|
|
6805
6850
|
|
|
6806
|
-
config.data_empty_label_text && main.select("text." +
|
|
6851
|
+
config.data_empty_label_text && main.select("text." + $TEXT.text + "." + $COMMON.empty).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null); // grid
|
|
6807
6852
|
|
|
6808
6853
|
$$.hasGrid() && $$.updateGrid(); // rect for regions
|
|
6809
6854
|
|
|
@@ -6816,7 +6861,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
6816
6861
|
}
|
|
6817
6862
|
}); // circles for select
|
|
6818
6863
|
|
|
6819
|
-
$el.text && main.selectAll("." +
|
|
6864
|
+
$el.text && main.selectAll("." + $SELECT.selectedCircles).filter($$.isBarType.bind($$)).selectAll("circle").remove(); // event rects will redrawn when flow called
|
|
6820
6865
|
|
|
6821
6866
|
if (config.interaction_enabled && !flow && wth.EventRect) {
|
|
6822
6867
|
$$.redrawEventRect();
|
|
@@ -7467,11 +7512,13 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
7467
7512
|
*/
|
|
7468
7513
|
getShapeYMin: function getShapeYMin(id) {
|
|
7469
7514
|
var $$ = this,
|
|
7470
|
-
|
|
7515
|
+
axisId = $$.axis.getId(id),
|
|
7516
|
+
scale = $$.scale[axisId],
|
|
7471
7517
|
_scale$domain = scale.domain(),
|
|
7472
|
-
yMin = _scale$domain[0]
|
|
7518
|
+
yMin = _scale$domain[0],
|
|
7519
|
+
inverted = $$.config["axis_" + axisId + "_inverted"];
|
|
7473
7520
|
|
|
7474
|
-
return !$$.isGrouped(id) && yMin > 0 ? yMin : 0;
|
|
7521
|
+
return !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;
|
|
7475
7522
|
},
|
|
7476
7523
|
|
|
7477
7524
|
/**
|
|
@@ -7622,7 +7669,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
7622
7669
|
return isValue(i) ? d.index === i : !0;
|
|
7623
7670
|
});
|
|
7624
7671
|
} else {
|
|
7625
|
-
shape = (id ? $el.main.selectAll("." +
|
|
7672
|
+
shape = (id ? $el.main.selectAll("." + classes[shapeName + "s"] + $$.getTargetSelectorSuffix(id)) : $el.main).selectAll("." + classes[shapeName] + suffix);
|
|
7626
7673
|
}
|
|
7627
7674
|
|
|
7628
7675
|
return shape;
|
|
@@ -7637,7 +7684,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
7637
7684
|
} else if ($$.hasValidPointType != null && $$.hasValidPointType(that.nodeName)) {
|
|
7638
7685
|
isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScaleById(d.id)(d.value)) : $$.isWithinCircle(that, $$.isBubbleType(d) ? $$.pointSelectR(d) * 1.5 : 0);
|
|
7639
7686
|
} else if (that.nodeName === "path") {
|
|
7640
|
-
isWithin = shape.classed(
|
|
7687
|
+
isWithin = shape.classed(classes.bar) ? $$.isWithinBar(that) : !0;
|
|
7641
7688
|
}
|
|
7642
7689
|
|
|
7643
7690
|
return isWithin;
|
|
@@ -7847,7 +7894,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
7847
7894
|
config = $$.config,
|
|
7848
7895
|
$el = $$.$el,
|
|
7849
7896
|
hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner,
|
|
7850
|
-
leftAxisClass = config.axis_rotated ?
|
|
7897
|
+
leftAxisClass = config.axis_rotated ? $AXIS.axisX : $AXIS.axisY,
|
|
7851
7898
|
leftAxis = $el.main.select("." + leftAxisClass).node(),
|
|
7852
7899
|
svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {
|
|
7853
7900
|
right: 0
|
|
@@ -7886,7 +7933,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
7886
7933
|
svg.attr("width", current.width).attr("height", current.height);
|
|
7887
7934
|
|
|
7888
7935
|
if (hasAxis) {
|
|
7889
|
-
var brush = svg.select("." +
|
|
7936
|
+
var brush = svg.select("." + $SUBCHART.brush + " .overlay"),
|
|
7890
7937
|
brushSize = {
|
|
7891
7938
|
width: 0,
|
|
7892
7939
|
height: 0
|
|
@@ -8049,7 +8096,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8049
8096
|
*/
|
|
8050
8097
|
initText: function initText() {
|
|
8051
8098
|
var $el = this.$el;
|
|
8052
|
-
$el.main.select("." +
|
|
8099
|
+
$el.main.select("." + $COMMON.chart).append("g").attr("class", $TEXT.chartTexts);
|
|
8053
8100
|
},
|
|
8054
8101
|
|
|
8055
8102
|
/**
|
|
@@ -8062,7 +8109,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8062
8109
|
classChartText = $$.getChartClass("Text"),
|
|
8063
8110
|
classTexts = $$.getClass("texts", "id"),
|
|
8064
8111
|
classFocus = $$.classFocus.bind($$),
|
|
8065
|
-
mainTextUpdate = $$.$el.main.select("." +
|
|
8112
|
+
mainTextUpdate = $$.$el.main.select("." + $TEXT.chartTexts).selectAll("." + $TEXT.chartText).data(targets).attr("class", function (d) {
|
|
8066
8113
|
return classChartText(d) + classFocus(d);
|
|
8067
8114
|
}),
|
|
8068
8115
|
mainTextEnter = mainTextUpdate.enter().append("g").style("opacity", "0").attr("class", classChartText).style("pointer-events", "none");
|
|
@@ -8079,7 +8126,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8079
8126
|
$T = $$.$T,
|
|
8080
8127
|
config = $$.config,
|
|
8081
8128
|
classText = $$.getClass("text", "index"),
|
|
8082
|
-
text = $el.main.selectAll("." +
|
|
8129
|
+
text = $el.main.selectAll("." + $TEXT.texts).selectAll("." + $TEXT.text).data($$.labelishData.bind($$));
|
|
8083
8130
|
$T(text.exit()).style("fill-opacity", "0").remove();
|
|
8084
8131
|
$el.text = text.enter().append("text").merge(text).attr("class", classText).attr("text-anchor", function (d) {
|
|
8085
8132
|
// when value is negative or
|
|
@@ -8442,7 +8489,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8442
8489
|
nodeForWidth = calcHypo(translate.e, translate.f) > calcHypo(coordinate.e, coordinate.f) ? textNode : filteredTextNode,
|
|
8443
8490
|
overlapsX = Math.ceil(Math.abs(translate.e - coordinate.e)) < Math.ceil(nodeForWidth.node().getComputedTextLength()),
|
|
8444
8491
|
overlapsY = Math.ceil(Math.abs(translate.f - coordinate.f)) < parseInt(textNode.style("font-size"), 10);
|
|
8445
|
-
filteredTextNode.classed(
|
|
8492
|
+
filteredTextNode.classed($TEXT.TextOverlapping, overlapsX && overlapsY);
|
|
8446
8493
|
});
|
|
8447
8494
|
},
|
|
8448
8495
|
|
|
@@ -8455,7 +8502,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8455
8502
|
*/
|
|
8456
8503
|
undoMarkOverlapped: function undoMarkOverlapped($$, selector) {
|
|
8457
8504
|
$$.$el.arcs.selectAll(selector).each(function () {
|
|
8458
|
-
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.selectAll)([this, this.previousSibling]).classed(
|
|
8505
|
+
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.selectAll)([this, this.previousSibling]).classed($TEXT.TextOverlapping, !1);
|
|
8459
8506
|
});
|
|
8460
8507
|
},
|
|
8461
8508
|
|
|
@@ -8523,7 +8570,7 @@ function getTextPos(pos, width) {
|
|
|
8523
8570
|
|
|
8524
8571
|
if (config.title_text) {
|
|
8525
8572
|
$el.title = $el.svg.append("g");
|
|
8526
|
-
var text = $el.title.append("text").style("text-anchor", getTextPos(config.title_position)).attr("class",
|
|
8573
|
+
var text = $el.title.append("text").style("text-anchor", getTextPos(config.title_position)).attr("class", $TEXT.title);
|
|
8527
8574
|
setTextValue(text, config.title_text, [.3, 1.5]);
|
|
8528
8575
|
}
|
|
8529
8576
|
},
|
|
@@ -8559,7 +8606,7 @@ function getTextPos(pos, width) {
|
|
|
8559
8606
|
config = $$.config,
|
|
8560
8607
|
current = $$.state.current,
|
|
8561
8608
|
position = config.title_position || "left",
|
|
8562
|
-
textRectWidth = $$.getTextRect($$.$el.title,
|
|
8609
|
+
textRectWidth = $$.getTextRect($$.$el.title, $TEXT.title).width,
|
|
8563
8610
|
x;
|
|
8564
8611
|
|
|
8565
8612
|
if (/(right|center)/.test(position)) {
|
|
@@ -8585,7 +8632,7 @@ function getTextPos(pos, width) {
|
|
|
8585
8632
|
*/
|
|
8586
8633
|
yForTitle: function yForTitle() {
|
|
8587
8634
|
var $$ = this;
|
|
8588
|
-
return ($$.config.title_padding.top || 0) + $$.getTextRect($$.$el.title,
|
|
8635
|
+
return ($$.config.title_padding.top || 0) + $$.getTextRect($$.$el.title, $TEXT.title).height;
|
|
8589
8636
|
},
|
|
8590
8637
|
|
|
8591
8638
|
/**
|
|
@@ -8619,7 +8666,7 @@ function getTextPos(pos, width) {
|
|
|
8619
8666
|
$el.tooltip = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(config.tooltip_contents.bindto);
|
|
8620
8667
|
|
|
8621
8668
|
if ($el.tooltip.empty()) {
|
|
8622
|
-
$el.tooltip = $el.chart.append("div").attr("class",
|
|
8669
|
+
$el.tooltip = $el.chart.append("div").attr("class", $TOOLTIP.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none");
|
|
8623
8670
|
}
|
|
8624
8671
|
|
|
8625
8672
|
$$.bindTooltipResizePos();
|
|
@@ -8772,13 +8819,13 @@ function getTextPos(pos, width) {
|
|
|
8772
8819
|
if (isUndefined(text)) {
|
|
8773
8820
|
var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x);
|
|
8774
8821
|
text = tplProcess(tpl[0], {
|
|
8775
|
-
CLASS_TOOLTIP:
|
|
8822
|
+
CLASS_TOOLTIP: $TOOLTIP.tooltip,
|
|
8776
8823
|
TITLE: isValue(title) ? tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""
|
|
8777
8824
|
});
|
|
8778
8825
|
}
|
|
8779
8826
|
|
|
8780
8827
|
if (!row.ratio && $$.$el.arcs) {
|
|
8781
|
-
row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path." +
|
|
8828
|
+
row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]);
|
|
8782
8829
|
}
|
|
8783
8830
|
|
|
8784
8831
|
param = [row.ratio, row.id, row.index, d];
|
|
@@ -8820,7 +8867,7 @@ function getTextPos(pos, width) {
|
|
|
8820
8867
|
var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))),
|
|
8821
8868
|
color = getBgColor(row),
|
|
8822
8869
|
contentValue = {
|
|
8823
|
-
CLASS_TOOLTIP_NAME:
|
|
8870
|
+
CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
|
|
8824
8871
|
COLOR: tplStr || !$$.patterns ? color : "<svg><rect style=\"fill:" + color + "\" width=\"10\" height=\"10\"></rect></svg>",
|
|
8825
8872
|
NAME: name,
|
|
8826
8873
|
VALUE: value
|
|
@@ -9158,14 +9205,14 @@ function getTextPos(pos, width) {
|
|
|
9158
9205
|
var $$ = this,
|
|
9159
9206
|
main = $$.$el.main,
|
|
9160
9207
|
$T = $$.$T,
|
|
9161
|
-
xAxis = transitions != null && transitions.axisX ? transitions.axisX : $T(main.select("." +
|
|
9162
|
-
yAxis = transitions != null && transitions.axisY ? transitions.axisY : $T(main.select("." +
|
|
9163
|
-
y2Axis = transitions != null && transitions.axisY2 ? transitions.axisY2 : $T(main.select("." +
|
|
9208
|
+
xAxis = transitions != null && transitions.axisX ? transitions.axisX : $T(main.select("." + $AXIS.axisX), withTransition),
|
|
9209
|
+
yAxis = transitions != null && transitions.axisY ? transitions.axisY : $T(main.select("." + $AXIS.axisY), withTransition),
|
|
9210
|
+
y2Axis = transitions != null && transitions.axisY2 ? transitions.axisY2 : $T(main.select("." + $AXIS.axisY2), withTransition);
|
|
9164
9211
|
$T(main, withTransition).attr("transform", $$.getTranslate("main"));
|
|
9165
9212
|
xAxis.attr("transform", $$.getTranslate("x"));
|
|
9166
9213
|
yAxis.attr("transform", $$.getTranslate("y"));
|
|
9167
9214
|
y2Axis.attr("transform", $$.getTranslate("y2"));
|
|
9168
|
-
main.select("." +
|
|
9215
|
+
main.select("." + $ARC.chartArcs).attr("transform", $$.getTranslate("arc"));
|
|
9169
9216
|
},
|
|
9170
9217
|
transformAll: function transformAll(withTransition, transitions) {
|
|
9171
9218
|
var $$ = this,
|
|
@@ -9786,7 +9833,7 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
9786
9833
|
|
|
9787
9834
|
$$.bindResize(); // Define regions
|
|
9788
9835
|
|
|
9789
|
-
var main = $el.svg.append("g").classed(
|
|
9836
|
+
var main = $el.svg.append("g").classed($COMMON.main, !0).attr("transform", $$.getTranslate("main"));
|
|
9790
9837
|
$el.main = main; // initialize subchart when subchart show option is set
|
|
9791
9838
|
|
|
9792
9839
|
config.subchart_show && $$.initSubchart();
|
|
@@ -9796,7 +9843,7 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
9796
9843
|
// text when empty
|
|
9797
9844
|
|
|
9798
9845
|
if (config.data_empty_label_text) {
|
|
9799
|
-
main.append("text").attr("class",
|
|
9846
|
+
main.append("text").attr("class", $TEXT.text + " " + $COMMON.empty).attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
|
|
9800
9847
|
.attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
|
|
9801
9848
|
}
|
|
9802
9849
|
|
|
@@ -9808,7 +9855,7 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
9808
9855
|
} // Define g for chart area
|
|
9809
9856
|
|
|
9810
9857
|
|
|
9811
|
-
main.append("g").attr("class",
|
|
9858
|
+
main.append("g").attr("class", $COMMON.chart).attr("clip-path", state.clip.path);
|
|
9812
9859
|
$$.callPluginHook("$init");
|
|
9813
9860
|
|
|
9814
9861
|
if (hasAxis) {
|
|
@@ -10007,7 +10054,7 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
10007
10054
|
var $$ = this,
|
|
10008
10055
|
svg = $$.$el.svg,
|
|
10009
10056
|
$T = $$.$T;
|
|
10010
|
-
$T(svg.selectAll("." +
|
|
10057
|
+
$T(svg.selectAll("." + $COMMON.target).filter(function (d) {
|
|
10011
10058
|
return $$.isTargetToShow(d.id);
|
|
10012
10059
|
})).style("opacity", null);
|
|
10013
10060
|
};
|
|
@@ -10711,11 +10758,11 @@ function nodeToSvgDataUrl(node, option, orgSize) {
|
|
|
10711
10758
|
candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
|
|
10712
10759
|
this.revert();
|
|
10713
10760
|
this.defocus();
|
|
10714
|
-
candidates.classed(
|
|
10761
|
+
candidates.classed($FOCUS.focused, !0).classed($FOCUS.defocused, !1);
|
|
10715
10762
|
|
|
10716
10763
|
if ($$.hasArcType() && !state.hasRadar) {
|
|
10717
10764
|
$$.expandArc(targetIds);
|
|
10718
|
-
$$.hasType("gauge") && $$.markOverlapped(targetIdsValue, $$, "." +
|
|
10765
|
+
$$.hasType("gauge") && $$.markOverlapped(targetIdsValue, $$, "." + $GAUGE.gaugeValue);
|
|
10719
10766
|
}
|
|
10720
10767
|
|
|
10721
10768
|
$$.toggleFocusLegend(targetIds, !0);
|
|
@@ -10747,11 +10794,11 @@ function nodeToSvgDataUrl(node, option, orgSize) {
|
|
|
10747
10794
|
state = $$.state,
|
|
10748
10795
|
targetIds = $$.mapToTargetIds(targetIdsValue),
|
|
10749
10796
|
candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
|
|
10750
|
-
candidates.classed(
|
|
10797
|
+
candidates.classed($FOCUS.focused, !1).classed($FOCUS.defocused, !0);
|
|
10751
10798
|
|
|
10752
10799
|
if ($$.hasArcType()) {
|
|
10753
10800
|
$$.unexpandArc(targetIds);
|
|
10754
|
-
$$.hasType("gauge") && $$.undoMarkOverlapped($$, "." +
|
|
10801
|
+
$$.hasType("gauge") && $$.undoMarkOverlapped($$, "." + $GAUGE.gaugeValue);
|
|
10755
10802
|
}
|
|
10756
10803
|
|
|
10757
10804
|
$$.toggleFocusLegend(targetIds, !1);
|
|
@@ -10786,14 +10833,14 @@ function nodeToSvgDataUrl(node, option, orgSize) {
|
|
|
10786
10833
|
targetIds = $$.mapToTargetIds(targetIdsValue),
|
|
10787
10834
|
candidates = $el.svg.selectAll($$.selectorTargets(targetIds));
|
|
10788
10835
|
// should be for all targets
|
|
10789
|
-
candidates.classed(
|
|
10836
|
+
candidates.classed($FOCUS.focused, !1).classed($FOCUS.defocused, !1);
|
|
10790
10837
|
$$.hasArcType() && $$.unexpandArc(targetIds);
|
|
10791
10838
|
|
|
10792
10839
|
if (config.legend_show) {
|
|
10793
10840
|
$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
|
|
10794
10841
|
$el.legend.selectAll($$.selectorLegends(targetIds)).filter(function () {
|
|
10795
|
-
return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(
|
|
10796
|
-
}).classed(
|
|
10842
|
+
return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused);
|
|
10843
|
+
}).classed($FOCUS.legendItemFocused, !1);
|
|
10797
10844
|
}
|
|
10798
10845
|
|
|
10799
10846
|
state.focusedTargetIds = [];
|
|
@@ -12032,8 +12079,8 @@ extend(regions, {
|
|
|
12032
12079
|
config = $$.config,
|
|
12033
12080
|
$T = $$.$T,
|
|
12034
12081
|
options = optionsValue || {},
|
|
12035
|
-
classes = getOption(options, "classes", [
|
|
12036
|
-
regions = $$.$el.main.select("." +
|
|
12082
|
+
classes = getOption(options, "classes", [$REGION.region]),
|
|
12083
|
+
regions = $$.$el.main.select("." + $REGION.regions).selectAll(classes.map(function (c) {
|
|
12037
12084
|
return "." + c;
|
|
12038
12085
|
}));
|
|
12039
12086
|
$T(regions).style("opacity", "0").remove();
|
|
@@ -13026,7 +13073,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13026
13073
|
var _proto = Axis.prototype;
|
|
13027
13074
|
|
|
13028
13075
|
_proto.getAxisClassName = function getAxisClassName(id) {
|
|
13029
|
-
return
|
|
13076
|
+
return $AXIS.axis + " " + $AXIS["axis" + capitalize(id)];
|
|
13030
13077
|
};
|
|
13031
13078
|
|
|
13032
13079
|
_proto.isHorizontal = function isHorizontal($$, forHorizontal) {
|
|
@@ -13096,7 +13143,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13096
13143
|
config.axis_y2_show && target.push("y2");
|
|
13097
13144
|
target.forEach(function (v) {
|
|
13098
13145
|
var classAxis = _this.getAxisClassName(v),
|
|
13099
|
-
classLabel =
|
|
13146
|
+
classLabel = $AXIS["axis" + v.toUpperCase() + "Label"];
|
|
13100
13147
|
|
|
13101
13148
|
axis[v] = main.append("g").attr("class", classAxis).attr("clip-path", function () {
|
|
13102
13149
|
var res = null;
|
|
@@ -13183,7 +13230,8 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13183
13230
|
var _this2 = this,
|
|
13184
13231
|
$$ = this.owner,
|
|
13185
13232
|
config = $$.config,
|
|
13186
|
-
main = $$.$el.main
|
|
13233
|
+
main = $$.$el.main,
|
|
13234
|
+
$T = $$.$T;
|
|
13187
13235
|
|
|
13188
13236
|
Object.keys(this.axesList).forEach(function (id) {
|
|
13189
13237
|
var axesConfig = config["axis_" + id + "_axes"],
|
|
@@ -13207,7 +13255,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13207
13255
|
g = main.append("g").attr("class", className).style("visibility", config["axis_" + id + "_show"] ? null : "hidden").call(v);
|
|
13208
13256
|
} else {
|
|
13209
13257
|
axesConfig[i].domain && scale.domain(axesConfig[i].domain);
|
|
13210
|
-
|
|
13258
|
+
$T(g).call(v.scale(scale));
|
|
13211
13259
|
}
|
|
13212
13260
|
|
|
13213
13261
|
g.attr("transform", $$.getTranslate(id, i + 1));
|
|
@@ -13663,9 +13711,9 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13663
13711
|
main = $$.$el.main,
|
|
13664
13712
|
$T = $$.$T,
|
|
13665
13713
|
labels = {
|
|
13666
|
-
x: main.select("." +
|
|
13667
|
-
y: main.select("." +
|
|
13668
|
-
y2: main.select("." +
|
|
13714
|
+
x: main.select("." + $AXIS.axisX + " ." + $AXIS.axisXLabel),
|
|
13715
|
+
y: main.select("." + $AXIS.axisY + " ." + $AXIS.axisYLabel),
|
|
13716
|
+
y2: main.select("." + $AXIS.axisY2 + " ." + $AXIS.axisY2Label)
|
|
13669
13717
|
};
|
|
13670
13718
|
|
|
13671
13719
|
Object.keys(labels).filter(function (id) {
|
|
@@ -13826,11 +13874,12 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13826
13874
|
}
|
|
13827
13875
|
|
|
13828
13876
|
["y", "y2"].forEach(function (key) {
|
|
13829
|
-
var
|
|
13877
|
+
var prefix = "axis_" + key + "_",
|
|
13878
|
+
axisScale = scale[key];
|
|
13830
13879
|
|
|
13831
|
-
if (axisScale) {
|
|
13832
|
-
var tickValues = config[
|
|
13833
|
-
tickCount = config[
|
|
13880
|
+
if (config[prefix + "show"] && axisScale) {
|
|
13881
|
+
var tickValues = config[prefix + "tick_values"],
|
|
13882
|
+
tickCount = config[prefix + "tick_count"];
|
|
13834
13883
|
axisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));
|
|
13835
13884
|
|
|
13836
13885
|
if (!tickValues && tickCount) {
|
|
@@ -13907,7 +13956,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13907
13956
|
|
|
13908
13957
|
if (type === "x") {
|
|
13909
13958
|
var clipPath = current.maxTickWidths.x.clipPath ? clip.pathXAxisTickTexts : null;
|
|
13910
|
-
$el.svg.selectAll("." +
|
|
13959
|
+
$el.svg.selectAll("." + $AXIS.axisX + " .tick text").attr("clip-path", clipPath);
|
|
13911
13960
|
}
|
|
13912
13961
|
}
|
|
13913
13962
|
});
|
|
@@ -13930,7 +13979,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13930
13979
|
*/
|
|
13931
13980
|
initEventRect: function initEventRect() {
|
|
13932
13981
|
var $$ = this;
|
|
13933
|
-
$$.$el.main.select("." +
|
|
13982
|
+
$$.$el.main.select("." + $COMMON.chart).append("g").attr("class", $EVENT.eventRects).style("fill-opacity", "0");
|
|
13934
13983
|
},
|
|
13935
13984
|
|
|
13936
13985
|
/**
|
|
@@ -13947,8 +13996,8 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13947
13996
|
if ($el.eventRect) {
|
|
13948
13997
|
$$.updateEventRect($el.eventRect, !0);
|
|
13949
13998
|
} else {
|
|
13950
|
-
var eventRects = $$.$el.main.select("." +
|
|
13951
|
-
eventRectUpdate = eventRects.selectAll("." +
|
|
13999
|
+
var eventRects = $$.$el.main.select("." + $EVENT.eventRects).style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? config.axis_rotated ? "ns-resize" : "ew-resize" : null).classed($EVENT.eventRectsMultiple, isMultipleX).classed($EVENT.eventRectsSingle, !isMultipleX),
|
|
14000
|
+
eventRectUpdate = eventRects.selectAll("." + $EVENT.eventRect).data([0]).enter().append("rect"); // append event <rect>
|
|
13952
14001
|
|
|
13953
14002
|
$$.updateEventRect(eventRectUpdate); // bind event to <rect> element
|
|
13954
14003
|
|
|
@@ -14026,7 +14075,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14026
14075
|
}).on("touchstart.eventRect touchmove.eventRect", function (event) {
|
|
14027
14076
|
state.event = event;
|
|
14028
14077
|
|
|
14029
|
-
if (!eventRect.empty() && eventRect.classed(
|
|
14078
|
+
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
14030
14079
|
// if touch points are > 1, means doing zooming interaction. In this case do not execute tooltip codes.
|
|
14031
14080
|
if (state.dragging || state.flowing || $$.hasArcType() || event.touches.length > 1) {
|
|
14032
14081
|
return;
|
|
@@ -14040,7 +14089,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14040
14089
|
}, !0).on("touchend.eventRect", function (event) {
|
|
14041
14090
|
state.event = event;
|
|
14042
14091
|
|
|
14043
|
-
if (!eventRect.empty() && eventRect.classed(
|
|
14092
|
+
if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
|
|
14044
14093
|
if ($$.hasArcType() || !$$.toggleShape || state.cancelClick) {
|
|
14045
14094
|
state.cancelClick && (state.cancelClick = !1);
|
|
14046
14095
|
}
|
|
@@ -14082,7 +14131,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14082
14131
|
rectElement.attr("x", 0).attr("y", 0).attr("width", width).attr("height", height); // only for init
|
|
14083
14132
|
|
|
14084
14133
|
if (!rendered) {
|
|
14085
|
-
rectElement.attr("class",
|
|
14134
|
+
rectElement.attr("class", $EVENT.eventRect);
|
|
14086
14135
|
}
|
|
14087
14136
|
}
|
|
14088
14137
|
|
|
@@ -14223,7 +14272,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14223
14272
|
$$.showGridFocus(selectedData); // Show cursor as pointer if point is close to mouse position
|
|
14224
14273
|
|
|
14225
14274
|
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
|
|
14226
|
-
$$.$el.svg.select("." +
|
|
14275
|
+
$$.$el.svg.select("." + $EVENT.eventRect).style("cursor", "pointer");
|
|
14227
14276
|
|
|
14228
14277
|
if (!state.mouseover) {
|
|
14229
14278
|
config.data_onover.call($$.api, closest);
|
|
@@ -14242,7 +14291,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14242
14291
|
_$$$$el2 = $$.$el,
|
|
14243
14292
|
circle = _$$$$el2.circle,
|
|
14244
14293
|
tooltip = _$$$$el2.tooltip;
|
|
14245
|
-
$$.$el.svg.select("." +
|
|
14294
|
+
$$.$el.svg.select("." + $EVENT.eventRect).style("cursor", null);
|
|
14246
14295
|
$$.hideGridFocus();
|
|
14247
14296
|
|
|
14248
14297
|
if (tooltip) {
|
|
@@ -14258,8 +14307,8 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14258
14307
|
/**
|
|
14259
14308
|
* Create eventRect for each data on the x-axis.
|
|
14260
14309
|
* Register touch and drag events.
|
|
14261
|
-
* @param {object} eventRectEnter d3.select(
|
|
14262
|
-
* @returns {object} d3.select(
|
|
14310
|
+
* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
|
|
14311
|
+
* @returns {object} d3.select($EVENT.eventRects) object.
|
|
14263
14312
|
* @private
|
|
14264
14313
|
*/
|
|
14265
14314
|
generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) {
|
|
@@ -14351,7 +14400,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14351
14400
|
}
|
|
14352
14401
|
|
|
14353
14402
|
var index = d.index;
|
|
14354
|
-
main.selectAll("." +
|
|
14403
|
+
main.selectAll("." + $SHAPE.shape + "-" + index).each(function (d2) {
|
|
14355
14404
|
if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
|
|
14356
14405
|
$$.toggleShape == null ? void 0 : $$.toggleShape(this, d2, index);
|
|
14357
14406
|
config.data_onclick.bind($$.api)(d2, this);
|
|
@@ -14362,7 +14411,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14362
14411
|
/**
|
|
14363
14412
|
* Create an eventRect,
|
|
14364
14413
|
* Register touch and drag events.
|
|
14365
|
-
* @param {object} eventRectEnter d3.select(
|
|
14414
|
+
* @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
|
|
14366
14415
|
* @private
|
|
14367
14416
|
*/
|
|
14368
14417
|
generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) {
|
|
@@ -14407,7 +14456,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
14407
14456
|
|
|
14408
14457
|
|
|
14409
14458
|
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
|
|
14410
|
-
$$.$el.main.selectAll("." +
|
|
14459
|
+
$$.$el.main.selectAll("." + $SHAPE.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + $SHAPE.shape + "-" + closest.index).each(function () {
|
|
14411
14460
|
if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
|
|
14412
14461
|
$$.toggleShape == null ? void 0 : $$.toggleShape(this, closest, closest.index);
|
|
14413
14462
|
config.data_onclick.bind($$.api)(closest, this);
|
|
@@ -14542,13 +14591,13 @@ var external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_ = __webpack
|
|
|
14542
14591
|
var target = [];
|
|
14543
14592
|
|
|
14544
14593
|
for (var i = 0; i < flowLength; i++) {
|
|
14545
|
-
target.push("." +
|
|
14594
|
+
target.push("." + classes[v] + "-" + i);
|
|
14546
14595
|
}
|
|
14547
14596
|
|
|
14548
|
-
svg.selectAll("." +
|
|
14597
|
+
svg.selectAll("." + classes[v + "s"]) // circles, shapes, texts, eventRects
|
|
14549
14598
|
.selectAll(target).remove();
|
|
14550
14599
|
});
|
|
14551
|
-
svg.select("." +
|
|
14600
|
+
svg.select("." + classes.xgrid).remove();
|
|
14552
14601
|
} // draw again for removing flowed elements and reverting attr
|
|
14553
14602
|
|
|
14554
14603
|
|
|
@@ -14841,9 +14890,9 @@ function smoothLines(el, type) {
|
|
|
14841
14890
|
$el = $$.$el;
|
|
14842
14891
|
|
|
14843
14892
|
if (config.grid_x_lines.length || config.grid_y_lines.length) {
|
|
14844
|
-
$el.gridLines.main = $el.main.insert("g", "." +
|
|
14845
|
-
$el.gridLines.main.append("g").attr("class",
|
|
14846
|
-
$el.gridLines.main.append("g").attr("class",
|
|
14893
|
+
$el.gridLines.main = $el.main.insert("g", "." + $COMMON.chart + (config.grid_lines_front ? " + *" : "")).attr("clip-path", clip.pathGrid).attr("class", $GRID.grid + " " + $GRID.gridLines);
|
|
14894
|
+
$el.gridLines.main.append("g").attr("class", $GRID.xgridLines);
|
|
14895
|
+
$el.gridLines.main.append("g").attr("class", $GRID.ygridLines);
|
|
14847
14896
|
$el.gridLines.x = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.selectAll)([]);
|
|
14848
14897
|
}
|
|
14849
14898
|
},
|
|
@@ -14873,9 +14922,9 @@ function smoothLines(el, type) {
|
|
|
14873
14922
|
"y1": 0,
|
|
14874
14923
|
"y2": state.height
|
|
14875
14924
|
};
|
|
14876
|
-
grid.x = main.select("." +
|
|
14925
|
+
grid.x = main.select("." + $GRID.xgrids).selectAll("." + $GRID.xgrid).data(xgridData);
|
|
14877
14926
|
grid.x.exit().remove();
|
|
14878
|
-
grid.x = grid.x.enter().append("line").attr("class",
|
|
14927
|
+
grid.x = grid.x.enter().append("line").attr("class", $GRID.xgrid).merge(grid.x);
|
|
14879
14928
|
|
|
14880
14929
|
if (!withoutUpdate) {
|
|
14881
14930
|
grid.x.each(function () {
|
|
@@ -14901,9 +14950,9 @@ function smoothLines(el, type) {
|
|
|
14901
14950
|
return Math.ceil($$.scale.y(d));
|
|
14902
14951
|
};
|
|
14903
14952
|
|
|
14904
|
-
grid.y = main.select("." +
|
|
14953
|
+
grid.y = main.select("." + $GRID.ygrids).selectAll("." + $GRID.ygrid).data(gridValues);
|
|
14905
14954
|
grid.y.exit().remove();
|
|
14906
|
-
grid.y = grid.y.enter().append("line").attr("class",
|
|
14955
|
+
grid.y = grid.y.enter().append("line").attr("class", $GRID.ygrid).merge(grid.y);
|
|
14907
14956
|
grid.y.attr("x1", isRotated ? pos : 0).attr("x2", isRotated ? pos : state.width).attr("y1", isRotated ? 0 : pos).attr("y2", isRotated ? state.height : pos);
|
|
14908
14957
|
smoothLines(grid.y, "grid");
|
|
14909
14958
|
},
|
|
@@ -14933,7 +14982,7 @@ function smoothLines(el, type) {
|
|
|
14933
14982
|
$T = $$.$T,
|
|
14934
14983
|
isRotated = config.axis_rotated;
|
|
14935
14984
|
config.grid_x_show && $$.updateXGrid();
|
|
14936
|
-
var xLines = main.select("." +
|
|
14985
|
+
var xLines = main.select("." + $GRID.xgridLines).selectAll("." + $GRID.xgridLine).data(config.grid_x_lines); // exit
|
|
14937
14986
|
|
|
14938
14987
|
$T(xLines.exit()).style("opacity", "0").remove(); // enter
|
|
14939
14988
|
|
|
@@ -14942,7 +14991,7 @@ function smoothLines(el, type) {
|
|
|
14942
14991
|
xgridLine.append("text").attr("transform", isRotated ? "" : "rotate(-90)").attr("dy", -5).style("opacity", "0");
|
|
14943
14992
|
xLines = xgridLine.merge(xLines);
|
|
14944
14993
|
$T(xLines.attr("class", function (d) {
|
|
14945
|
-
return (
|
|
14994
|
+
return ($GRID.xgridLine + " " + (d.class || "")).trim();
|
|
14946
14995
|
}).select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx)).text(function (d) {
|
|
14947
14996
|
return d.text;
|
|
14948
14997
|
}).style("opacity", null);
|
|
@@ -14963,7 +15012,7 @@ function smoothLines(el, type) {
|
|
|
14963
15012
|
$T = $$.$T,
|
|
14964
15013
|
isRotated = config.axis_rotated;
|
|
14965
15014
|
config.grid_y_show && $$.updateYGrid();
|
|
14966
|
-
var ygridLines = $el.main.select("." +
|
|
15015
|
+
var ygridLines = $el.main.select("." + $GRID.ygridLines).selectAll("." + $GRID.ygridLine).data(config.grid_y_lines); // exit
|
|
14967
15016
|
|
|
14968
15017
|
$T(ygridLines.exit()).style("opacity", "0").remove(); // enter
|
|
14969
15018
|
|
|
@@ -14974,7 +15023,7 @@ function smoothLines(el, type) {
|
|
|
14974
15023
|
|
|
14975
15024
|
var yv = $$.yv.bind($$);
|
|
14976
15025
|
$T(ygridLines.attr("class", function (d) {
|
|
14977
|
-
return (
|
|
15026
|
+
return ($GRID.ygridLine + " " + (d.class || "")).trim();
|
|
14978
15027
|
}).select("line")).attr("x1", isRotated ? yv : 0).attr("x2", isRotated ? yv : width).attr("y1", isRotated ? 0 : yv).attr("y2", isRotated ? height : yv).style("opacity", null);
|
|
14979
15028
|
$T(ygridLines.select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx)).attr("dy", -5).attr("x", getGridTextX(isRotated, width, height)).attr("y", yv).text(function (d) {
|
|
14980
15029
|
return d.text;
|
|
@@ -15004,17 +15053,17 @@ function smoothLines(el, type) {
|
|
|
15004
15053
|
clip = $$.state.clip,
|
|
15005
15054
|
$el = $$.$el,
|
|
15006
15055
|
isFront = config.grid_front,
|
|
15007
|
-
className = "." +
|
|
15008
|
-
grid = $el.main.insert("g", className).attr("clip-path", clip.pathGrid).attr("class",
|
|
15056
|
+
className = "." + (isFront && $el.gridLines.main ? $GRID.gridLines : $COMMON.chart) + (isFront ? " + *" : ""),
|
|
15057
|
+
grid = $el.main.insert("g", className).attr("clip-path", clip.pathGrid).attr("class", $GRID.grid);
|
|
15009
15058
|
$el.grid.main = grid;
|
|
15010
|
-
config.grid_x_show && grid.append("g").attr("class",
|
|
15011
|
-
config.grid_y_show && grid.append("g").attr("class",
|
|
15059
|
+
config.grid_x_show && grid.append("g").attr("class", $GRID.xgrids);
|
|
15060
|
+
config.grid_y_show && grid.append("g").attr("class", $GRID.ygrids);
|
|
15012
15061
|
|
|
15013
15062
|
if (config.interaction_enabled && config.grid_focus_show) {
|
|
15014
|
-
grid.append("g").attr("class",
|
|
15063
|
+
grid.append("g").attr("class", $FOCUS.xgridFocus).append("line").attr("class", $FOCUS.xgridFocus); // to show xy focus grid line, should be 'tooltip.grouped=false'
|
|
15015
15064
|
|
|
15016
15065
|
if (config.grid_focus_y && !config.tooltip_grouped) {
|
|
15017
|
-
grid.append("g").attr("class",
|
|
15066
|
+
grid.append("g").attr("class", $FOCUS.ygridFocus).append("line").attr("class", $FOCUS.ygridFocus);
|
|
15018
15067
|
}
|
|
15019
15068
|
}
|
|
15020
15069
|
},
|
|
@@ -15031,7 +15080,7 @@ function smoothLines(el, type) {
|
|
|
15031
15080
|
width = _$$$state3.width,
|
|
15032
15081
|
height = _$$$state3.height,
|
|
15033
15082
|
isRotated = config.axis_rotated,
|
|
15034
|
-
focusEl = $$.$el.main.selectAll("line." +
|
|
15083
|
+
focusEl = $$.$el.main.selectAll("line." + $FOCUS.xgridFocus + ", line." + $FOCUS.ygridFocus),
|
|
15035
15084
|
dataToShow = (data || [focusEl.datum()]).filter(function (d) {
|
|
15036
15085
|
return d && isValue($$.getBaseValue(d));
|
|
15037
15086
|
});
|
|
@@ -15051,7 +15100,7 @@ function smoothLines(el, type) {
|
|
|
15051
15100
|
},
|
|
15052
15101
|
xy;
|
|
15053
15102
|
|
|
15054
|
-
if (el.classed(
|
|
15103
|
+
if (el.classed($FOCUS.xgridFocus)) {
|
|
15055
15104
|
// will contain 'x1, y1, x2, y2' order
|
|
15056
15105
|
xy = isRotated ? [null, // x1
|
|
15057
15106
|
pos.x, // y1
|
|
@@ -15082,7 +15131,7 @@ function smoothLines(el, type) {
|
|
|
15082
15131
|
main = $$.$el.main;
|
|
15083
15132
|
|
|
15084
15133
|
if (inputType === "mouse" || !resizing) {
|
|
15085
|
-
main.selectAll("line." +
|
|
15134
|
+
main.selectAll("line." + $FOCUS.xgridFocus + ", line." + $FOCUS.ygridFocus).style("visibility", "hidden");
|
|
15086
15135
|
$$.hideCircleFocus == null ? void 0 : $$.hideCircleFocus();
|
|
15087
15136
|
}
|
|
15088
15137
|
},
|
|
@@ -15094,7 +15143,7 @@ function smoothLines(el, type) {
|
|
|
15094
15143
|
height = _$$$state5.height,
|
|
15095
15144
|
resizing = _$$$state5.resizing,
|
|
15096
15145
|
grid = $$.$el.grid,
|
|
15097
|
-
xgridFocus = grid.main.select("line." +
|
|
15146
|
+
xgridFocus = grid.main.select("line." + $FOCUS.xgridFocus);
|
|
15098
15147
|
|
|
15099
15148
|
if (inputType === "touch") {
|
|
15100
15149
|
if (xgridFocus.empty()) {
|
|
@@ -15113,7 +15162,7 @@ function smoothLines(el, type) {
|
|
|
15113
15162
|
},
|
|
15114
15163
|
generateGridData: function generateGridData(type, scale) {
|
|
15115
15164
|
var $$ = this,
|
|
15116
|
-
tickNum = $$.$el.main.select("." +
|
|
15165
|
+
tickNum = $$.$el.main.select("." + $AXIS.axisX).selectAll(".tick").size(),
|
|
15117
15166
|
gridData = [];
|
|
15118
15167
|
|
|
15119
15168
|
if (type === "year") {
|
|
@@ -15158,8 +15207,8 @@ function smoothLines(el, type) {
|
|
|
15158
15207
|
config = $$.config,
|
|
15159
15208
|
$T = $$.$T,
|
|
15160
15209
|
toRemove = $$.getGridFilterToRemove(params),
|
|
15161
|
-
classLines = forX ?
|
|
15162
|
-
classLine = forX ?
|
|
15210
|
+
classLines = forX ? $GRID.xgridLines : $GRID.ygridLines,
|
|
15211
|
+
classLine = forX ? $GRID.xgridLine : $GRID.ygridLine;
|
|
15163
15212
|
$T($$.$el.main.select("." + classLines).selectAll("." + classLine).filter(toRemove)).style("opacity", "0").remove();
|
|
15164
15213
|
var gridLines = "grid_" + (forX ? "x" : "y") + "_lines";
|
|
15165
15214
|
config[gridLines] = config[gridLines].filter(function toShow(line) {
|
|
@@ -15180,7 +15229,7 @@ function smoothLines(el, type) {
|
|
|
15180
15229
|
initRegion: function initRegion() {
|
|
15181
15230
|
var $$ = this,
|
|
15182
15231
|
$el = $$.$el;
|
|
15183
|
-
$el.region.main = $el.main.insert("g", ":first-child").attr("clip-path", $$.state.clip.path).attr("class",
|
|
15232
|
+
$el.region.main = $el.main.insert("g", ":first-child").attr("clip-path", $$.state.clip.path).attr("class", $REGION.regions);
|
|
15184
15233
|
},
|
|
15185
15234
|
updateRegion: function updateRegion() {
|
|
15186
15235
|
var $$ = this,
|
|
@@ -15195,7 +15244,7 @@ function smoothLines(el, type) {
|
|
|
15195
15244
|
|
|
15196
15245
|
region.main.style("visibility", $$.hasArcType() ? "hidden" : null); // select <g> element
|
|
15197
15246
|
|
|
15198
|
-
var list = region.main.selectAll("." +
|
|
15247
|
+
var list = region.main.selectAll("." + $REGION.region).data(config.regions);
|
|
15199
15248
|
$T(list.exit()).style("opacity", "0").remove();
|
|
15200
15249
|
list = list.enter().append("g").merge(list).attr("class", $$.classRegion.bind($$));
|
|
15201
15250
|
list.append("rect").style("fill-opacity", "0");
|
|
@@ -17697,14 +17746,14 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17697
17746
|
var interval = setInterval(function () {
|
|
17698
17747
|
if (!transiting) {
|
|
17699
17748
|
clearInterval(interval);
|
|
17700
|
-
$el.legend.selectAll("." +
|
|
17749
|
+
$el.legend.selectAll("." + $FOCUS.legendItemFocused).size() > 0 && $$.expandArc(targetIds);
|
|
17701
17750
|
}
|
|
17702
17751
|
}, 10);
|
|
17703
17752
|
return;
|
|
17704
17753
|
}
|
|
17705
17754
|
|
|
17706
17755
|
var newTargetIds = $$.mapToTargetIds(targetIds);
|
|
17707
|
-
$el.svg.selectAll($$.selectorTargets(newTargetIds, "." +
|
|
17756
|
+
$el.svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).each(function (d) {
|
|
17708
17757
|
if (!$$.shouldExpand(d.data.id)) {
|
|
17709
17758
|
return;
|
|
17710
17759
|
}
|
|
@@ -17724,10 +17773,10 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17724
17773
|
}
|
|
17725
17774
|
|
|
17726
17775
|
var newTargetIds = $$.mapToTargetIds(targetIds);
|
|
17727
|
-
svg.selectAll($$.selectorTargets(newTargetIds, "." +
|
|
17776
|
+
svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).selectAll("path").transition().duration(function (d) {
|
|
17728
17777
|
return $$.getExpandConfig(d.data.id, "duration");
|
|
17729
17778
|
}).attr("d", $$.svgArc);
|
|
17730
|
-
svg.selectAll("" +
|
|
17779
|
+
svg.selectAll("" + $ARC.arc).style("opacity", null);
|
|
17731
17780
|
},
|
|
17732
17781
|
|
|
17733
17782
|
/**
|
|
@@ -17792,20 +17841,20 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17792
17841
|
classChartArc = $$.getChartClass("Arc"),
|
|
17793
17842
|
classArcs = $$.getClass("arcs", !0),
|
|
17794
17843
|
classFocus = $$.classFocus.bind($$),
|
|
17795
|
-
chartArcs = $el.main.select("." +
|
|
17796
|
-
mainPieUpdate = chartArcs.selectAll("." +
|
|
17844
|
+
chartArcs = $el.main.select("." + $ARC.chartArcs),
|
|
17845
|
+
mainPieUpdate = chartArcs.selectAll("." + $ARC.chartArc).data($$.pie(targets)).attr("class", function (d) {
|
|
17797
17846
|
return classChartArc(d) + classFocus(d.data);
|
|
17798
17847
|
}),
|
|
17799
17848
|
mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc);
|
|
17800
17849
|
mainPieEnter.append("g").attr("class", classArcs).merge(mainPieUpdate);
|
|
17801
17850
|
mainPieEnter.append("text").attr("dy", hasGauge && !$$.hasMultiTargets() ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", "middle").style("pointer-events", "none");
|
|
17802
|
-
$el.text = chartArcs.selectAll("." +
|
|
17851
|
+
$el.text = chartArcs.selectAll("." + $COMMON.target + " text"); // MEMO: can not keep same color..., but not bad to update color in redraw
|
|
17803
17852
|
// mainPieUpdate.exit().remove();
|
|
17804
17853
|
},
|
|
17805
17854
|
initArc: function initArc() {
|
|
17806
17855
|
var $$ = this,
|
|
17807
17856
|
$el = $$.$el;
|
|
17808
|
-
$el.arcs = $el.main.select("." +
|
|
17857
|
+
$el.arcs = $el.main.select("." + $COMMON.chart).append("g").attr("class", $ARC.chartArcs).attr("transform", $$.getTranslate("arc"));
|
|
17809
17858
|
$$.setArcTitle();
|
|
17810
17859
|
},
|
|
17811
17860
|
|
|
@@ -17819,7 +17868,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17819
17868
|
hasGauge = $$.hasType("gauge");
|
|
17820
17869
|
|
|
17821
17870
|
if (title) {
|
|
17822
|
-
var text = $$.$el.arcs.append("text").attr("class",
|
|
17871
|
+
var text = $$.$el.arcs.append("text").attr("class", hasGauge ? $GAUGE.chartArcsGaugeTitle : $ARC.chartArcsTitle).style("text-anchor", "middle");
|
|
17823
17872
|
hasGauge && text.attr("dy", "-0.3em");
|
|
17824
17873
|
setTextValue(text, title, hasGauge ? undefined : [-.6, 1.35], !0);
|
|
17825
17874
|
}
|
|
@@ -17831,7 +17880,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17831
17880
|
main = $$.$el.main,
|
|
17832
17881
|
hasInteraction = config.interaction_enabled,
|
|
17833
17882
|
isSelectable = hasInteraction && config.data_selection_isselectable,
|
|
17834
|
-
mainArc = main.selectAll("." +
|
|
17883
|
+
mainArc = main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arc).data($$.arcData.bind($$));
|
|
17835
17884
|
mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove();
|
|
17836
17885
|
mainArc = mainArc.enter().append("path").attr("class", $$.getClass("arc", !0)).style("fill", function (d) {
|
|
17837
17886
|
return $$.color(d.data);
|
|
@@ -17920,13 +17969,13 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17920
17969
|
isFullCircle = config.gauge_fullCircle,
|
|
17921
17970
|
startAngle = $$.getStartAngle(),
|
|
17922
17971
|
endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1,
|
|
17923
|
-
backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." +
|
|
17972
|
+
backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." + $ARC.chartArcsBackground);
|
|
17924
17973
|
|
|
17925
17974
|
if (hasMultiArcGauge) {
|
|
17926
17975
|
var index = 0;
|
|
17927
|
-
backgroundArc = backgroundArc.selectAll("path." +
|
|
17976
|
+
backgroundArc = backgroundArc.selectAll("path." + $ARC.chartArcsBackground).data($$.data.targets);
|
|
17928
17977
|
backgroundArc.enter().append("path").attr("class", function (d, i) {
|
|
17929
|
-
return
|
|
17978
|
+
return $ARC.chartArcsBackground + " " + $ARC.chartArcsBackground + "-" + i;
|
|
17930
17979
|
}).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref2) {
|
|
17931
17980
|
var id = _ref2.id;
|
|
17932
17981
|
|
|
@@ -18068,8 +18117,8 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18068
18117
|
|
|
18069
18118
|
// for gauge type, update text when has no title & multi data
|
|
18070
18119
|
if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
|
|
18071
|
-
text = main.selectAll("." +
|
|
18072
|
-
return $$.isGaugeType(d.data) ?
|
|
18120
|
+
text = main.selectAll("." + $ARC.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
|
|
18121
|
+
return $$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null;
|
|
18073
18122
|
}).call($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) {
|
|
18074
18123
|
return $$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ? Math.round(state.radius / 5) + "px" : null;
|
|
18075
18124
|
}).transition().duration(duration).style("opacity", function (d) {
|
|
@@ -18078,7 +18127,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18078
18127
|
hasMultiArcGauge && text.attr("dy", "-.1em");
|
|
18079
18128
|
}
|
|
18080
18129
|
|
|
18081
|
-
main.select("." +
|
|
18130
|
+
main.select("." + $ARC.chartArcsTitle).style("opacity", $$.hasType("donut") || hasGauge ? null : "0");
|
|
18082
18131
|
|
|
18083
18132
|
if (hasGauge) {
|
|
18084
18133
|
var _text,
|
|
@@ -18087,10 +18136,10 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18087
18136
|
isFullCircle && ((_text = text) == null ? void 0 : _text.attr("dy", "" + (hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
|
|
18088
18137
|
|
|
18089
18138
|
if (config.gauge_label_show) {
|
|
18090
|
-
arcs.select("." +
|
|
18091
|
-
arcs.select("." +
|
|
18139
|
+
arcs.select("." + $GAUGE.chartArcsGaugeUnit).attr("dy", (isFullCircle ? 1.5 : .75) + "em").text(config.gauge_units);
|
|
18140
|
+
arcs.select("." + $GAUGE.chartArcsGaugeMin).attr("dx", -1 * (state.innerRadius + (state.radius - state.innerRadius) / (isFullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_min, !1)); // show max text when isn't fullCircle
|
|
18092
18141
|
|
|
18093
|
-
isFullCircle || arcs.select("." +
|
|
18142
|
+
isFullCircle || arcs.select("." + $GAUGE.chartArcsGaugeMax).attr("dx", state.innerRadius + (state.radius - state.innerRadius) / 2 + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_max, !0));
|
|
18094
18143
|
}
|
|
18095
18144
|
}
|
|
18096
18145
|
}
|
|
@@ -18108,7 +18157,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18108
18157
|
initArea: function initArea(mainLine) {
|
|
18109
18158
|
var $$ = this,
|
|
18110
18159
|
config = $$.config;
|
|
18111
|
-
mainLine.insert("g", "." +
|
|
18160
|
+
mainLine.insert("g", "." + (config.area_front ? $CIRCLE.circles : $LINE.lines)).attr("class", $$.getClass("areas", !0));
|
|
18112
18161
|
},
|
|
18113
18162
|
updateAreaGradient: function updateAreaGradient() {
|
|
18114
18163
|
var $$ = this,
|
|
@@ -18158,7 +18207,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18158
18207
|
$T = $$.$T,
|
|
18159
18208
|
$root = isSub ? $el.subchart : $el;
|
|
18160
18209
|
config.area_linearGradient && $$.updateAreaGradient();
|
|
18161
|
-
var area = $root.main.selectAll("." +
|
|
18210
|
+
var area = $root.main.selectAll("." + $AREA.areas).selectAll("." + $AREA.area).data($$.lineData.bind($$));
|
|
18162
18211
|
$T(area.exit(), withTransition).style("opacity", "0").remove();
|
|
18163
18212
|
$root.area = area.enter().append("path").attr("class", $$.getClass("area", !0)).style("fill", $$.updateAreaColor.bind($$)).style("opacity", function () {
|
|
18164
18213
|
state.orgAreaOpacity = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).style("opacity");
|
|
@@ -18285,8 +18334,8 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18285
18334
|
var $el = this.$el,
|
|
18286
18335
|
config = this.config,
|
|
18287
18336
|
clip = this.state.clip;
|
|
18288
|
-
$el.bar = $el.main.select("." +
|
|
18289
|
-
.insert("g", ":first-child").attr("class",
|
|
18337
|
+
$el.bar = $el.main.select("." + $COMMON.chart) // should positioned at the beginning of the shape node to not overlap others
|
|
18338
|
+
.insert("g", ":first-child").attr("class", $BAR.chartBars); // set clip-path attribute when condition meet
|
|
18290
18339
|
// https://github.com/naver/billboard.js/issues/2421
|
|
18291
18340
|
|
|
18292
18341
|
if (config.clipPath === !1 && (config.bar_radius || config.bar_radius_ratio)) {
|
|
@@ -18306,7 +18355,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18306
18355
|
$$.initBar();
|
|
18307
18356
|
}
|
|
18308
18357
|
|
|
18309
|
-
var mainBarUpdate = $$.$el.main.select("." +
|
|
18358
|
+
var mainBarUpdate = $$.$el.main.select("." + $BAR.chartBars).selectAll("." + $BAR.chartBar).data( // remove
|
|
18310
18359
|
targets.filter(function (v) {
|
|
18311
18360
|
return v.values.some(function (d) {
|
|
18312
18361
|
return isNumber(d.value) || $$.isBarRangeType(d);
|
|
@@ -18340,7 +18389,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18340
18389
|
$root = isSub ? $el.subchart : $el,
|
|
18341
18390
|
classBar = $$.getClass("bar", !0),
|
|
18342
18391
|
initialOpacity = $$.initialOpacity.bind($$),
|
|
18343
|
-
bar = $root.main.selectAll("." +
|
|
18392
|
+
bar = $root.main.selectAll("." + $BAR.bars).selectAll("." + $BAR.bar).data($$.labelishData.bind($$));
|
|
18344
18393
|
$T(bar.exit(), withTransition).style("opacity", "0").remove();
|
|
18345
18394
|
$root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.color).merge(bar).style("opacity", initialOpacity);
|
|
18346
18395
|
},
|
|
@@ -18512,8 +18561,8 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18512
18561
|
/* harmony default export */ var candlestick = ({
|
|
18513
18562
|
initCandlestick: function initCandlestick() {
|
|
18514
18563
|
var $el = this.$el;
|
|
18515
|
-
$el.candlestick = $el.main.select("." +
|
|
18516
|
-
.append("g").attr("class",
|
|
18564
|
+
$el.candlestick = $el.main.select("." + $COMMON.chart) // should positioned at the beginning of the shape node to not overlap others
|
|
18565
|
+
.append("g").attr("class", $CANDLESTICK.chartCandlesticks);
|
|
18517
18566
|
},
|
|
18518
18567
|
|
|
18519
18568
|
/**
|
|
@@ -18532,7 +18581,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18532
18581
|
$$.initCandlestick();
|
|
18533
18582
|
}
|
|
18534
18583
|
|
|
18535
|
-
var mainUpdate = $$.$el.main.select("." +
|
|
18584
|
+
var mainUpdate = $$.$el.main.select("." + $CANDLESTICK.chartCandlesticks).selectAll("." + $CANDLESTICK.chartCandlestick).data(targets).attr("class", function (d) {
|
|
18536
18585
|
return classChart(d) + classFocus(d);
|
|
18537
18586
|
});
|
|
18538
18587
|
mainUpdate.enter().append("g").attr("class", classChart).style("pointer-events", "none");
|
|
@@ -18555,7 +18604,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18555
18604
|
$root = isSub ? $el.subchart : $el,
|
|
18556
18605
|
classSetter = $$.getClass("candlestick", !0),
|
|
18557
18606
|
initialOpacity = $$.initialOpacity.bind($$),
|
|
18558
|
-
candlestick = $root.main.selectAll("." +
|
|
18607
|
+
candlestick = $root.main.selectAll("." + $CANDLESTICK.chartCandlestick).selectAll("." + $CANDLESTICK.candlestick).data($$.labelishData.bind($$));
|
|
18559
18608
|
$T(candlestick.exit(), withTransition).style("opacity", "0").remove();
|
|
18560
18609
|
var candlestickEnter = candlestick.enter().filter(function (d) {
|
|
18561
18610
|
return d.value;
|
|
@@ -18591,7 +18640,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18591
18640
|
indexX = +isRotated;
|
|
18592
18641
|
|
|
18593
18642
|
if (g.classed) {
|
|
18594
|
-
g.classed(
|
|
18643
|
+
g.classed($CANDLESTICK[isUp ? "valueUp" : "valueDown"], !0);
|
|
18595
18644
|
}
|
|
18596
18645
|
|
|
18597
18646
|
var path = isRotated ? "H" + points[1][1] + " V" + points[1][0] + " H" + points[0][1] : "V" + points[1][1] + " H" + points[1][0] + " V" + points[0][1];
|
|
@@ -18760,12 +18809,12 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18760
18809
|
|
|
18761
18810
|
if ($$.hasType("gauge")) {
|
|
18762
18811
|
var hasMulti = $$.hasMultiArcGauge();
|
|
18763
|
-
arcs.append(hasMulti ? "g" : "path").attr("class",
|
|
18764
|
-
config.gauge_units && appendText(
|
|
18812
|
+
arcs.append(hasMulti ? "g" : "path").attr("class", $ARC.chartArcsBackground).style("fill", !hasMulti && config.gauge_background || null);
|
|
18813
|
+
config.gauge_units && appendText($GAUGE.chartArcsGaugeUnit);
|
|
18765
18814
|
|
|
18766
18815
|
if (config.gauge_label_show) {
|
|
18767
|
-
appendText(
|
|
18768
|
-
config.gauge_fullCircle || appendText(
|
|
18816
|
+
appendText($GAUGE.chartArcsGaugeMin);
|
|
18817
|
+
config.gauge_fullCircle || appendText($GAUGE.chartArcsGaugeMax);
|
|
18769
18818
|
}
|
|
18770
18819
|
}
|
|
18771
18820
|
},
|
|
@@ -18787,9 +18836,9 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18787
18836
|
state = $$.state,
|
|
18788
18837
|
$el = $$.$el,
|
|
18789
18838
|
hiddenTargetIds = $$.state.hiddenTargetIds,
|
|
18790
|
-
arcLabelLines = $el.main.selectAll("." +
|
|
18839
|
+
arcLabelLines = $el.main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arcLabelLine).data($$.arcData.bind($$)),
|
|
18791
18840
|
mainArcLabelLine = arcLabelLines.enter().append("rect").attr("class", function (d) {
|
|
18792
|
-
return
|
|
18841
|
+
return $ARC.arcLabelLine + " " + $COMMON.target + " " + $COMMON.target + "-" + d.data.id;
|
|
18793
18842
|
}).merge(arcLabelLines);
|
|
18794
18843
|
mainArcLabelLine.style("fill", function (d) {
|
|
18795
18844
|
return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data);
|
|
@@ -18920,7 +18969,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18920
18969
|
/* harmony default export */ var line = ({
|
|
18921
18970
|
initLine: function initLine() {
|
|
18922
18971
|
var $el = this.$el;
|
|
18923
|
-
$el.line = $el.main.select("." +
|
|
18972
|
+
$el.line = $el.main.select("." + $COMMON.chart).append("g").attr("class", $LINE.chartLines);
|
|
18924
18973
|
},
|
|
18925
18974
|
updateTargetsForLine: function updateTargetsForLine(t) {
|
|
18926
18975
|
var $$ = this,
|
|
@@ -18939,7 +18988,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18939
18988
|
var targets = t.filter(function (d) {
|
|
18940
18989
|
return !($$.isScatterType(d) || $$.isBubbleType(d));
|
|
18941
18990
|
}),
|
|
18942
|
-
mainLineUpdate = main.select("." +
|
|
18991
|
+
mainLineUpdate = main.select("." + $LINE.chartLines).selectAll("." + $LINE.chartLine).data(targets).attr("class", function (d) {
|
|
18943
18992
|
return classChartLine(d) + classFocus(d);
|
|
18944
18993
|
}),
|
|
18945
18994
|
mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", "none");
|
|
@@ -18969,7 +19018,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
18969
19018
|
$el = $$.$el,
|
|
18970
19019
|
$T = $$.$T,
|
|
18971
19020
|
$root = isSub ? $el.subchart : $el,
|
|
18972
|
-
line = $root.main.selectAll("." +
|
|
19021
|
+
line = $root.main.selectAll("." + $LINE.lines).selectAll("." + $LINE.line).data($$.lineData.bind($$));
|
|
18973
19022
|
$T(line.exit(), withTransition).style("opacity", "0").remove();
|
|
18974
19023
|
$root.line = line.enter().append("path").attr("class", function (d) {
|
|
18975
19024
|
return $$.getClass("line", !0)(d) + " " + (extraLineClasses(d) || "");
|
|
@@ -19261,8 +19310,8 @@ var getTransitionName = function () {
|
|
|
19261
19310
|
main = $$.$el.main;
|
|
19262
19311
|
$$.point = $$.generatePoint();
|
|
19263
19312
|
|
|
19264
|
-
if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select("." +
|
|
19265
|
-
main.select("." +
|
|
19313
|
+
if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select("." + $CIRCLE.chartCircles).empty()) {
|
|
19314
|
+
main.select("." + $COMMON.chart).append("g").attr("class", $CIRCLE.chartCircles);
|
|
19266
19315
|
}
|
|
19267
19316
|
},
|
|
19268
19317
|
updateTargetForCircle: function updateTargetForCircle(targetsValue, enterNodeValue) {
|
|
@@ -19288,21 +19337,21 @@ var getTransitionName = function () {
|
|
|
19288
19337
|
targets = data.targets.filter(function (d) {
|
|
19289
19338
|
return _this.isScatterType(d) || _this.isBubbleType(d);
|
|
19290
19339
|
});
|
|
19291
|
-
var mainCircle = $el.main.select("." +
|
|
19340
|
+
var mainCircle = $el.main.select("." + $CIRCLE.chartCircles).style("pointer-events", "none").selectAll("." + $CIRCLE.circles).data(targets).attr("class", classCircles);
|
|
19292
19341
|
mainCircle.exit().remove();
|
|
19293
19342
|
enterNode = mainCircle.enter();
|
|
19294
19343
|
} // Circles for each data point on lines
|
|
19295
19344
|
|
|
19296
19345
|
|
|
19297
19346
|
selectionEnabled && enterNode.append("g").attr("class", function (d) {
|
|
19298
|
-
return $$.generateClass(
|
|
19347
|
+
return $$.generateClass($SELECT.selectedCircles, d.id);
|
|
19299
19348
|
});
|
|
19300
19349
|
enterNode.append("g").attr("class", classCircles).style("cursor", function (d) {
|
|
19301
19350
|
return isFunction(isSelectable) && isSelectable(d) ? "pointer" : null;
|
|
19302
19351
|
}); // Update date for selected circles
|
|
19303
19352
|
|
|
19304
19353
|
selectionEnabled && targets.forEach(function (t) {
|
|
19305
|
-
$el.main.selectAll("." +
|
|
19354
|
+
$el.main.selectAll("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll("" + $SELECT.selectedCircle).each(function (d) {
|
|
19306
19355
|
d.value = t.values[d.index].value;
|
|
19307
19356
|
});
|
|
19308
19357
|
});
|
|
@@ -19320,12 +19369,12 @@ var getTransitionName = function () {
|
|
|
19320
19369
|
$root = isSub ? $el.subchart : $el;
|
|
19321
19370
|
|
|
19322
19371
|
if (config.point_show && !state.toggling) {
|
|
19323
|
-
var circles = $root.main.selectAll("." +
|
|
19372
|
+
var circles = $root.main.selectAll("." + $CIRCLE.circles).selectAll("." + $CIRCLE.circle).data(function (d) {
|
|
19324
19373
|
return $$.isLineType(d) && $$.shouldDrawPointsForLine(d) || $$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ? focusOnly ? [d.values[0]] : d.values : [];
|
|
19325
19374
|
});
|
|
19326
19375
|
circles.exit().remove();
|
|
19327
19376
|
circles.enter().filter(Boolean).append($$.point("create", this, $$.pointR.bind($$), $$.color));
|
|
19328
|
-
$root.circle = $root.main.selectAll("." +
|
|
19377
|
+
$root.circle = $root.main.selectAll("." + $CIRCLE.circles + " ." + $CIRCLE.circle).style("stroke", $$.color).style("opacity", $$.initialOpacityForCircle.bind($$));
|
|
19329
19378
|
}
|
|
19330
19379
|
},
|
|
19331
19380
|
redrawCircle: function redrawCircle(cx, cy, withTransition, flow, isSub) {
|
|
@@ -19338,7 +19387,7 @@ var getTransitionName = function () {
|
|
|
19338
19387
|
$el = $$.$el,
|
|
19339
19388
|
$T = $$.$T,
|
|
19340
19389
|
$root = isSub ? $el.subchart : $el,
|
|
19341
|
-
selectedCircles = $root.main.selectAll("." +
|
|
19390
|
+
selectedCircles = $root.main.selectAll("." + $SELECT.selectedCircle);
|
|
19342
19391
|
|
|
19343
19392
|
if (!$$.config.point_show) {
|
|
19344
19393
|
return [];
|
|
@@ -19438,7 +19487,7 @@ var getTransitionName = function () {
|
|
|
19438
19487
|
var $$ = this,
|
|
19439
19488
|
r = $$.pointExpandedR.bind($$);
|
|
19440
19489
|
reset && $$.unexpandCircles();
|
|
19441
|
-
var circles = $$.getShapeByIndex("circle", i, id).classed(
|
|
19490
|
+
var circles = $$.getShapeByIndex("circle", i, id).classed($COMMON.EXPANDED, !0),
|
|
19442
19491
|
scale = r(circles) / $$.config.point_r,
|
|
19443
19492
|
ratio = 1 - scale;
|
|
19444
19493
|
|
|
@@ -19467,8 +19516,8 @@ var getTransitionName = function () {
|
|
|
19467
19516
|
var $$ = this,
|
|
19468
19517
|
r = $$.pointR.bind($$),
|
|
19469
19518
|
circles = $$.getShapeByIndex("circle", i).filter(function () {
|
|
19470
|
-
return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(
|
|
19471
|
-
}).classed(
|
|
19519
|
+
return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($COMMON.EXPANDED);
|
|
19520
|
+
}).classed($COMMON.EXPANDED, !1);
|
|
19472
19521
|
circles.attr("r", r);
|
|
19473
19522
|
$$.isCirclePoint() || circles.attr("transform", "scale(" + r(circles) / $$.config.point_r + ")");
|
|
19474
19523
|
},
|
|
@@ -19560,8 +19609,8 @@ var getTransitionName = function () {
|
|
|
19560
19609
|
pointClass = d === !0 ? circle.each(function (d) {
|
|
19561
19610
|
var className = $$.getClass("circle", !0)(d);
|
|
19562
19611
|
|
|
19563
|
-
if (this.getAttribute("class").indexOf(
|
|
19564
|
-
className += " " +
|
|
19612
|
+
if (this.getAttribute("class").indexOf($COMMON.EXPANDED) > -1) {
|
|
19613
|
+
className += " " + $COMMON.EXPANDED;
|
|
19565
19614
|
}
|
|
19566
19615
|
|
|
19567
19616
|
this.setAttribute("class", className);
|
|
@@ -19754,13 +19803,13 @@ var cacheKey = KEY.radarPoints;
|
|
|
19754
19803
|
$el = $$.$el;
|
|
19755
19804
|
|
|
19756
19805
|
if ($$.hasType("radar")) {
|
|
19757
|
-
$el.radar = $el.main.select("." +
|
|
19806
|
+
$el.radar = $el.main.select("." + $COMMON.chart).append("g").attr("class", $RADAR.chartRadars); // level
|
|
19758
19807
|
|
|
19759
|
-
$el.radar.levels = $el.radar.append("g").attr("class",
|
|
19808
|
+
$el.radar.levels = $el.radar.append("g").attr("class", $RADAR.levels); // axis
|
|
19760
19809
|
|
|
19761
|
-
$el.radar.axes = $el.radar.append("g").attr("class",
|
|
19810
|
+
$el.radar.axes = $el.radar.append("g").attr("class", $AXIS.axis); // shapes
|
|
19762
19811
|
|
|
19763
|
-
$el.radar.shapes = $el.radar.append("g").attr("class",
|
|
19812
|
+
$el.radar.shapes = $el.radar.append("g").attr("class", $SHAPE.shapes);
|
|
19764
19813
|
current.dataMax = config.radar_axis_max || $$.getMinMaxData().max[0].value;
|
|
19765
19814
|
}
|
|
19766
19815
|
},
|
|
@@ -19838,7 +19887,7 @@ var cacheKey = KEY.radarPoints;
|
|
|
19838
19887
|
// Adjust radar, circles and texts' position
|
|
19839
19888
|
if (translate) {
|
|
19840
19889
|
radar.attr("transform", translate);
|
|
19841
|
-
main.select("." +
|
|
19890
|
+
main.select("." + $TEXT.chartTexts).attr("transform", translate);
|
|
19842
19891
|
$$.generateRadarPoints();
|
|
19843
19892
|
$$.updateRadarLevel();
|
|
19844
19893
|
$$.updateRadarAxes();
|
|
@@ -19877,11 +19926,11 @@ var cacheKey = KEY.radarPoints;
|
|
|
19877
19926
|
});
|
|
19878
19927
|
return pos.join(" ");
|
|
19879
19928
|
}),
|
|
19880
|
-
level = radarLevels.selectAll("." +
|
|
19929
|
+
level = radarLevels.selectAll("." + $RADAR.level).data(levelData);
|
|
19881
19930
|
|
|
19882
19931
|
level.exit().remove();
|
|
19883
19932
|
var levelEnter = level.enter().append("g").attr("class", function (d, i) {
|
|
19884
|
-
return
|
|
19933
|
+
return $RADAR.level + " " + $RADAR.level + "-" + i;
|
|
19885
19934
|
});
|
|
19886
19935
|
levelEnter.append("polygon").style("visibility", config.radar_level_show ? null : "hidden");
|
|
19887
19936
|
|
|
@@ -19923,7 +19972,7 @@ var cacheKey = KEY.radarPoints;
|
|
|
19923
19972
|
|
|
19924
19973
|
axis.exit().remove();
|
|
19925
19974
|
var axisEnter = axis.enter().append("g").attr("class", function (d, i) {
|
|
19926
|
-
return
|
|
19975
|
+
return $AXIS.axis + "-" + i;
|
|
19927
19976
|
});
|
|
19928
19977
|
config.radar_axis_line_show && axisEnter.append("line");
|
|
19929
19978
|
config.radar_axis_text_show && axisEnter.append("text");
|
|
@@ -21149,8 +21198,8 @@ var _area = function area() {
|
|
|
21149
21198
|
selected: function selected(targetId) {
|
|
21150
21199
|
var $$ = this.internal,
|
|
21151
21200
|
dataPoint = [];
|
|
21152
|
-
$$.$el.main.selectAll("." + (
|
|
21153
|
-
return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(
|
|
21201
|
+
$$.$el.main.selectAll("." + ($SHAPE.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll("." + $SHAPE.shape).filter(function () {
|
|
21202
|
+
return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($SELECT.SELECTED);
|
|
21154
21203
|
}).each(function (d) {
|
|
21155
21204
|
return dataPoint.push(d);
|
|
21156
21205
|
});
|
|
@@ -21190,25 +21239,25 @@ var _area = function area() {
|
|
|
21190
21239
|
return;
|
|
21191
21240
|
}
|
|
21192
21241
|
|
|
21193
|
-
$el.main.selectAll("." +
|
|
21242
|
+
$el.main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).each(function (d, i) {
|
|
21194
21243
|
var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
|
|
21195
21244
|
id = d.data ? d.data.id : d.id,
|
|
21196
21245
|
toggle = $$.getToggle(this, d).bind($$),
|
|
21197
21246
|
isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
|
|
21198
21247
|
isTargetIndex = !indices || indices.indexOf(i) >= 0,
|
|
21199
|
-
isSelected = shape.classed(
|
|
21248
|
+
isSelected = shape.classed($SELECT.SELECTED);
|
|
21200
21249
|
|
|
21201
21250
|
// line/area selection not supported yet
|
|
21202
|
-
if (shape.classed(
|
|
21251
|
+
if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
|
|
21203
21252
|
return;
|
|
21204
21253
|
}
|
|
21205
21254
|
|
|
21206
21255
|
if (isTargetId && isTargetIndex) {
|
|
21207
21256
|
if (config.data_selection_isselectable.bind($$.api)(d) && !isSelected) {
|
|
21208
|
-
toggle(!0, shape.classed(
|
|
21257
|
+
toggle(!0, shape.classed($SELECT.SELECTED, !0), d, i);
|
|
21209
21258
|
}
|
|
21210
21259
|
} else if (isDefined(resetOther) && resetOther && isSelected) {
|
|
21211
|
-
toggle(!1, shape.classed(
|
|
21260
|
+
toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
|
|
21212
21261
|
}
|
|
21213
21262
|
});
|
|
21214
21263
|
},
|
|
@@ -21239,21 +21288,21 @@ var _area = function area() {
|
|
|
21239
21288
|
return;
|
|
21240
21289
|
}
|
|
21241
21290
|
|
|
21242
|
-
$el.main.selectAll("." +
|
|
21291
|
+
$el.main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).each(function (d, i) {
|
|
21243
21292
|
var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
|
|
21244
21293
|
id = d.data ? d.data.id : d.id,
|
|
21245
21294
|
toggle = $$.getToggle(this, d).bind($$),
|
|
21246
21295
|
isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
|
|
21247
21296
|
isTargetIndex = !indices || indices.indexOf(i) >= 0,
|
|
21248
|
-
isSelected = shape.classed(
|
|
21297
|
+
isSelected = shape.classed($SELECT.SELECTED);
|
|
21249
21298
|
|
|
21250
21299
|
// line/area selection not supported yet
|
|
21251
|
-
if (shape.classed(
|
|
21300
|
+
if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
|
|
21252
21301
|
return;
|
|
21253
21302
|
}
|
|
21254
21303
|
|
|
21255
21304
|
if (isTargetId && isTargetIndex && config.data_selection_isselectable.bind($$.api)(d) && isSelected) {
|
|
21256
|
-
toggle(!1, shape.classed(
|
|
21305
|
+
toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
|
|
21257
21306
|
}
|
|
21258
21307
|
});
|
|
21259
21308
|
}
|
|
@@ -21300,12 +21349,12 @@ var _area = function area() {
|
|
|
21300
21349
|
$$.unbindZoomEvent();
|
|
21301
21350
|
config.subchart_show = !show;
|
|
21302
21351
|
subchart.main || $$.initSubchart();
|
|
21303
|
-
var $target = subchart.main.selectAll("." +
|
|
21352
|
+
var $target = subchart.main.selectAll("." + $COMMON.target); // need to cover when new data has been loaded
|
|
21304
21353
|
|
|
21305
21354
|
if ($$.data.targets.length !== $target.size()) {
|
|
21306
21355
|
$$.updateSizes();
|
|
21307
21356
|
$$.updateTargetsForSubchart($$.data.targets);
|
|
21308
|
-
$target = subchart.main.selectAll("." +
|
|
21357
|
+
$target = subchart.main.selectAll("." + $COMMON.target);
|
|
21309
21358
|
}
|
|
21310
21359
|
|
|
21311
21360
|
$target.style("opacity", null);
|
|
@@ -21645,25 +21694,25 @@ extend(zoom, {
|
|
|
21645
21694
|
minY = isSelectionGrouped ? state.margin.top : Math.min(sy, my),
|
|
21646
21695
|
maxY = isSelectionGrouped ? state.height : Math.max(sy, my);
|
|
21647
21696
|
|
|
21648
|
-
main.select("." +
|
|
21697
|
+
main.select("." + $DRAG.dragarea).attr("x", minX).attr("y", minY).attr("width", maxX - minX).attr("height", maxY - minY); // TODO: binary search when multiple xs
|
|
21649
21698
|
|
|
21650
|
-
main.selectAll("." +
|
|
21699
|
+
main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).filter(function (d) {
|
|
21651
21700
|
var _isSelectable;
|
|
21652
21701
|
|
|
21653
21702
|
return (_isSelectable = isSelectable) == null ? void 0 : _isSelectable.bind($$.api)(d);
|
|
21654
21703
|
}).each(function (d, i) {
|
|
21655
21704
|
var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
|
|
21656
|
-
isSelected = shape.classed(
|
|
21657
|
-
isIncluded = shape.classed(
|
|
21705
|
+
isSelected = shape.classed($SELECT.SELECTED),
|
|
21706
|
+
isIncluded = shape.classed($DRAG.INCLUDED),
|
|
21658
21707
|
isWithin = !1,
|
|
21659
21708
|
toggle;
|
|
21660
21709
|
|
|
21661
|
-
if (shape.classed(
|
|
21710
|
+
if (shape.classed($CIRCLE.circle)) {
|
|
21662
21711
|
var x = +shape.attr("cx") * 1,
|
|
21663
21712
|
y = +shape.attr("cy") * 1;
|
|
21664
21713
|
toggle = $$.togglePoint;
|
|
21665
21714
|
isWithin = minX < x && x < maxX && minY < y && y < maxY;
|
|
21666
|
-
} else if (shape.classed(
|
|
21715
|
+
} else if (shape.classed($BAR.bar)) {
|
|
21667
21716
|
var _getPathBox = getPathBox(this),
|
|
21668
21717
|
_x = _getPathBox.x,
|
|
21669
21718
|
y = _getPathBox.y,
|
|
@@ -21679,9 +21728,9 @@ extend(zoom, {
|
|
|
21679
21728
|
|
|
21680
21729
|
|
|
21681
21730
|
if (isWithin ^ isIncluded) {
|
|
21682
|
-
shape.classed(
|
|
21731
|
+
shape.classed($DRAG.INCLUDED, !isIncluded); // TODO: included/unincluded callback here
|
|
21683
21732
|
|
|
21684
|
-
shape.classed(
|
|
21733
|
+
shape.classed($SELECT.SELECTED, !isSelected);
|
|
21685
21734
|
toggle.call($$, !isSelected, shape, d, i);
|
|
21686
21735
|
}
|
|
21687
21736
|
});
|
|
@@ -21704,7 +21753,7 @@ extend(zoom, {
|
|
|
21704
21753
|
}
|
|
21705
21754
|
|
|
21706
21755
|
state.dragStart = mouse;
|
|
21707
|
-
main.select("." +
|
|
21756
|
+
main.select("." + $COMMON.chart).append("rect").attr("class", $DRAG.dragarea).style("opacity", "0.1");
|
|
21708
21757
|
$$.setDragStatus(!0);
|
|
21709
21758
|
},
|
|
21710
21759
|
|
|
@@ -21724,8 +21773,8 @@ extend(zoom, {
|
|
|
21724
21773
|
return;
|
|
21725
21774
|
}
|
|
21726
21775
|
|
|
21727
|
-
$T(main.select("." +
|
|
21728
|
-
main.selectAll("." +
|
|
21776
|
+
$T(main.select("." + $DRAG.dragarea)).style("opacity", "0").remove();
|
|
21777
|
+
main.selectAll("." + $SHAPE.shape).classed($DRAG.INCLUDED, !1);
|
|
21729
21778
|
$$.setDragStatus(!1);
|
|
21730
21779
|
}
|
|
21731
21780
|
});
|
|
@@ -21763,8 +21812,8 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
21763
21812
|
r = $$.pointSelectR.bind($$);
|
|
21764
21813
|
callFn(config.data_onselected, $$.api, d, target.node()); // add selected-circle on low layer g
|
|
21765
21814
|
|
|
21766
|
-
$T(main.select("." +
|
|
21767
|
-
return $$.generateClass(
|
|
21815
|
+
$T(main.select("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + $SELECT.selectedCircle + "-" + i).data([d]).enter().append("circle").attr("class", function () {
|
|
21816
|
+
return $$.generateClass($SELECT.selectedCircle, i);
|
|
21768
21817
|
}).attr("cx", cx).attr("cy", cy).attr("stroke", $$.color).attr("r", function (d2) {
|
|
21769
21818
|
return $$.pointSelectR(d2) * 1.4;
|
|
21770
21819
|
})).attr("r", r);
|
|
@@ -21784,7 +21833,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
21784
21833
|
$T = $$.$T;
|
|
21785
21834
|
callFn(config.data_onunselected, $$.api, d, target.node()); // remove selected-circle from low layer g
|
|
21786
21835
|
|
|
21787
|
-
$T(main.select("." +
|
|
21836
|
+
$T(main.select("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + $SELECT.selectedCircle + "-" + i)).attr("r", 0).remove();
|
|
21788
21837
|
},
|
|
21789
21838
|
|
|
21790
21839
|
/**
|
|
@@ -21867,32 +21916,33 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
21867
21916
|
toggleShape: function toggleShape(that, d, i) {
|
|
21868
21917
|
var $$ = this,
|
|
21869
21918
|
config = $$.config,
|
|
21870
|
-
main = $$.$el.main
|
|
21871
|
-
shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(that),
|
|
21872
|
-
isSelected = shape.classed(config_classes.SELECTED),
|
|
21873
|
-
toggle = $$.getToggle(that, d).bind($$),
|
|
21874
|
-
toggledShape;
|
|
21919
|
+
main = $$.$el.main;
|
|
21875
21920
|
|
|
21876
21921
|
if (config.data_selection_enabled && config.data_selection_isselectable.bind($$.api)(d)) {
|
|
21922
|
+
var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(that),
|
|
21923
|
+
isSelected = shape.classed($SELECT.SELECTED),
|
|
21924
|
+
toggle = $$.getToggle(that, d).bind($$),
|
|
21925
|
+
toggledShape;
|
|
21926
|
+
|
|
21877
21927
|
if (!config.data_selection_multiple) {
|
|
21878
|
-
var selector = "." +
|
|
21928
|
+
var selector = "." + $SHAPE.shapes;
|
|
21879
21929
|
|
|
21880
21930
|
if (config.data_selection_grouped) {
|
|
21881
21931
|
selector += $$.getTargetSelectorSuffix(d.id);
|
|
21882
21932
|
}
|
|
21883
21933
|
|
|
21884
|
-
main.selectAll(selector).selectAll("." +
|
|
21934
|
+
main.selectAll(selector).selectAll("." + $SHAPE.shape).each(function (d, i) {
|
|
21885
21935
|
var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this);
|
|
21886
21936
|
|
|
21887
|
-
if (shape.classed(
|
|
21937
|
+
if (shape.classed($SELECT.SELECTED)) {
|
|
21888
21938
|
toggledShape = shape;
|
|
21889
|
-
toggle(!1, shape.classed(
|
|
21939
|
+
toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
|
|
21890
21940
|
}
|
|
21891
21941
|
});
|
|
21892
21942
|
}
|
|
21893
21943
|
|
|
21894
21944
|
if (!toggledShape || toggledShape.node() !== shape.node()) {
|
|
21895
|
-
shape.classed(
|
|
21945
|
+
shape.classed($SELECT.SELECTED, !isSelected);
|
|
21896
21946
|
toggle(!isSelected, shape, d, i);
|
|
21897
21947
|
}
|
|
21898
21948
|
}
|
|
@@ -21924,7 +21974,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
21924
21974
|
$$.brush = (isRotated ? (0,external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_.brushY)() : (0,external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_.brushX)()).handleSize(5);
|
|
21925
21975
|
|
|
21926
21976
|
var getBrushSize = function () {
|
|
21927
|
-
var brush = $$.$el.svg.select("." +
|
|
21977
|
+
var brush = $$.$el.svg.select("." + classes.brush + " .overlay"),
|
|
21928
21978
|
brushSize = {
|
|
21929
21979
|
width: 0,
|
|
21930
21980
|
height: 0
|
|
@@ -21988,7 +22038,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
21988
22038
|
}).length === 0) {
|
|
21989
22039
|
var _subchart$main;
|
|
21990
22040
|
|
|
21991
|
-
(_subchart$main = subchart.main) == null ? void 0 : _subchart$main.select("." +
|
|
22041
|
+
(_subchart$main = subchart.main) == null ? void 0 : _subchart$main.select("." + classes.brush).call(this);
|
|
21992
22042
|
}
|
|
21993
22043
|
|
|
21994
22044
|
return this;
|
|
@@ -22017,7 +22067,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22017
22067
|
|
|
22018
22068
|
$$.brush.getSelection = function () {
|
|
22019
22069
|
return (// @ts-ignore
|
|
22020
|
-
subchart.main ? subchart.main.select("." +
|
|
22070
|
+
subchart.main ? subchart.main.select("." + classes.brush) : (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)([])
|
|
22021
22071
|
);
|
|
22022
22072
|
};
|
|
22023
22073
|
},
|
|
@@ -22048,18 +22098,18 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22048
22098
|
clip.idSubchart = clipId;
|
|
22049
22099
|
$$.appendClip(defs, clipId);
|
|
22050
22100
|
$$.initBrush();
|
|
22051
|
-
subchart.main = svg.append("g").classed(
|
|
22101
|
+
subchart.main = svg.append("g").classed(classes.subchart, !0).attr("transform", $$.getTranslate("context"));
|
|
22052
22102
|
var main = subchart.main;
|
|
22053
22103
|
main.style("visibility", visibility); // Define g for chart area
|
|
22054
22104
|
|
|
22055
|
-
main.append("g").attr("clip-path", clipPath).attr("class",
|
|
22105
|
+
main.append("g").attr("clip-path", clipPath).attr("class", classes.chart); // Define g for chart types area
|
|
22056
22106
|
|
|
22057
22107
|
["bar", "line", "bubble", "candlestick", "scatter"].forEach(function (v) {
|
|
22058
22108
|
var type = capitalize(/^(bubble|scatter)$/.test(v) ? "circle" : v);
|
|
22059
22109
|
|
|
22060
22110
|
if ($$.hasType(v) || $$.hasTypeOf(type)) {
|
|
22061
|
-
var chart = main.select("." +
|
|
22062
|
-
chartClassName =
|
|
22111
|
+
var chart = main.select("." + classes.chart),
|
|
22112
|
+
chartClassName = classes["chart" + type + "s"];
|
|
22063
22113
|
|
|
22064
22114
|
if (chart.select("." + chartClassName).empty()) {
|
|
22065
22115
|
chart.append("g").attr("class", chartClassName);
|
|
@@ -22067,11 +22117,11 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22067
22117
|
}
|
|
22068
22118
|
}); // Add extent rect for Brush
|
|
22069
22119
|
|
|
22070
|
-
var brush = main.append("g").attr("clip-path", clipPath).attr("class",
|
|
22120
|
+
var brush = main.append("g").attr("clip-path", clipPath).attr("class", classes.brush).call($$.brush);
|
|
22071
22121
|
config.subchart_showHandle && $$.addBrushHandle(brush); // ATTENTION: This must be called AFTER chart added
|
|
22072
22122
|
// Add Axis
|
|
22073
22123
|
|
|
22074
|
-
axis.subX = main.append("g").attr("class",
|
|
22124
|
+
axis.subX = main.append("g").attr("class", classes.axisX).attr("transform", $$.getTranslate("subX")).attr("clip-path", config.axis_rotated ? "" : clip.pathXAxis).style("visibility", config.subchart_axis_x_show ? visibility : "hidden");
|
|
22075
22125
|
},
|
|
22076
22126
|
|
|
22077
22127
|
/**
|
|
@@ -22119,14 +22169,14 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22119
22169
|
name = capitalize(isPointType ? "circle" : v),
|
|
22120
22170
|
chartClass = $$.getChartClass(name, !0),
|
|
22121
22171
|
shapeClass = $$.getClass(isPointType ? "circles" : v + "s", !0),
|
|
22122
|
-
shapeChart = main.select("." +
|
|
22172
|
+
shapeChart = main.select("." + classes["chart" + (name + "s")]);
|
|
22123
22173
|
|
|
22124
22174
|
if (isPointType) {
|
|
22125
|
-
var circle = shapeChart.selectAll("." +
|
|
22175
|
+
var circle = shapeChart.selectAll("." + classes.circles).data(targets.filter($$["is" + capitalize(v) + "Type"].bind($$))).attr("class", shapeClass);
|
|
22126
22176
|
circle.exit().remove();
|
|
22127
22177
|
circle.enter().append("g").attr("class", shapeClass);
|
|
22128
22178
|
} else {
|
|
22129
|
-
var shapeUpdate = shapeChart.selectAll("." +
|
|
22179
|
+
var shapeUpdate = shapeChart.selectAll("." + classes["chart" + name]).attr("class", chartClass).data(targets.filter($$["is" + name + "Type"].bind($$))),
|
|
22130
22180
|
shapeEnter = shapeUpdate.enter().append("g").style("opacity", "0").attr("class", chartClass).append("g").attr("class", shapeClass);
|
|
22131
22181
|
shapeUpdate.exit().remove(); // Area
|
|
22132
22182
|
|
|
@@ -22134,7 +22184,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22134
22184
|
}
|
|
22135
22185
|
}); // -- Brush --//
|
|
22136
22186
|
|
|
22137
|
-
main.selectAll("." +
|
|
22187
|
+
main.selectAll("." + classes.brush + " rect").attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? state.width2 : state.height2);
|
|
22138
22188
|
}
|
|
22139
22189
|
},
|
|
22140
22190
|
|
|
@@ -22216,7 +22266,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22216
22266
|
var $$ = this,
|
|
22217
22267
|
subchart = $$.$el.subchart,
|
|
22218
22268
|
$T = $$.$T,
|
|
22219
|
-
subXAxis = transitions != null && transitions.axisSubX ? transitions.axisSubX : $T(subchart.main.select("." +
|
|
22269
|
+
subXAxis = transitions != null && transitions.axisSubX ? transitions.axisSubX : $T(subchart.main.select("." + classes.axisX), withTransition);
|
|
22220
22270
|
subchart.main.attr("transform", $$.getTranslate("context"));
|
|
22221
22271
|
subXAxis.attr("transform", $$.getTranslate("subX"));
|
|
22222
22272
|
},
|
|
@@ -22536,7 +22586,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22536
22586
|
$$.unselectRect();
|
|
22537
22587
|
|
|
22538
22588
|
if (!zoomRect) {
|
|
22539
|
-
zoomRect = $$.$el.main.append("rect").attr("clip-path", state.clip.path).attr("class",
|
|
22589
|
+
zoomRect = $$.$el.main.append("rect").attr("clip-path", state.clip.path).attr("class", $ZOOM.zoomBrush).attr("width", isRotated ? state.width : 0).attr("height", isRotated ? 0 : state.height);
|
|
22540
22590
|
}
|
|
22541
22591
|
|
|
22542
22592
|
start = getPointer(event, this)[prop.index];
|
|
@@ -22579,10 +22629,10 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
22579
22629
|
|
|
22580
22630
|
if (resetButton && config.zoom_type === "drag") {
|
|
22581
22631
|
if (!$el.zoomResetBtn) {
|
|
22582
|
-
$el.zoomResetBtn = $$.$el.chart.append("div").classed(
|
|
22632
|
+
$el.zoomResetBtn = $$.$el.chart.append("div").classed($COMMON.button, !0).append("span").on("click", function () {
|
|
22583
22633
|
isFunction(resetButton.onclick) && resetButton.onclick.bind($$.api)(this);
|
|
22584
22634
|
$$.api.unzoom();
|
|
22585
|
-
}).classed(
|
|
22635
|
+
}).classed($ZOOM.buttonZoomReset, !0).text(resetButton.text || "Reset Zoom");
|
|
22586
22636
|
} else {
|
|
22587
22637
|
$el.zoomResetBtn.style("display", null);
|
|
22588
22638
|
}
|
|
@@ -22956,7 +23006,7 @@ var _defaults = {},
|
|
|
22956
23006
|
* bb.version; // "1.0.0"
|
|
22957
23007
|
* @memberof bb
|
|
22958
23008
|
*/
|
|
22959
|
-
version: "3.
|
|
23009
|
+
version: "3.3.0",
|
|
22960
23010
|
|
|
22961
23011
|
/**
|
|
22962
23012
|
* Generate chart
|
|
@@ -23090,7 +23140,7 @@ var _defaults = {},
|
|
|
23090
23140
|
};
|
|
23091
23141
|
/**
|
|
23092
23142
|
* @namespace bb
|
|
23093
|
-
* @version 3.
|
|
23143
|
+
* @version 3.3.0
|
|
23094
23144
|
*/
|
|
23095
23145
|
;// CONCATENATED MODULE: ./src/index.ts
|
|
23096
23146
|
/**
|