@hpcc-js/chart 2.72.0 → 2.76.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/index.es6.js +176 -176
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +176 -176
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +11 -26
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
})(this, (function (exports, api, common, util) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/chart";
|
|
8
|
-
var PKG_VERSION = "2.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
8
|
+
var PKG_VERSION = "2.76.1";
|
|
9
|
+
var BUILD_VERSION = "2.102.4";
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -4169,180 +4169,180 @@
|
|
|
4169
4169
|
}
|
|
4170
4170
|
}
|
|
4171
4171
|
|
|
4172
|
-
function d3Bullet () {
|
|
4173
|
-
var orient = "left",
|
|
4174
|
-
reverse = false,
|
|
4175
|
-
vertical = false,
|
|
4176
|
-
ranges = bulvarRanges,
|
|
4177
|
-
markers = bulvarMarkers,
|
|
4178
|
-
measures = bulvarMeasures,
|
|
4179
|
-
width = 380,
|
|
4180
|
-
height = 30,
|
|
4181
|
-
xAxis = axisLeft();
|
|
4182
|
-
|
|
4183
|
-
// For each small multiple…
|
|
4184
|
-
function bulvar(g) {
|
|
4185
|
-
g.each(function (d, i) {
|
|
4186
|
-
var rangez = ranges.call(this, d, i).slice().sort(common.descending),
|
|
4187
|
-
markerz = markers.call(this, d, i).slice().sort(common.descending),
|
|
4188
|
-
measurez = measures.call(this, d, i).slice().sort(common.descending),
|
|
4189
|
-
g2 = common.select(this),
|
|
4190
|
-
extentX,
|
|
4191
|
-
extentY;
|
|
4192
|
-
|
|
4193
|
-
var wrap = g2.select("g.wrap");
|
|
4194
|
-
if (wrap.empty()) wrap = g2.append("g").attr("class", "wrap");
|
|
4195
|
-
|
|
4196
|
-
if (vertical) {
|
|
4197
|
-
extentX = height, extentY = width;
|
|
4198
|
-
wrap.attr("transform", "rotate(90)translate(0," + -width + ")");
|
|
4199
|
-
} else {
|
|
4200
|
-
extentX = width, extentY = height;
|
|
4201
|
-
wrap.attr("transform", null);
|
|
4202
|
-
}
|
|
4203
|
-
|
|
4204
|
-
// Compute the new x-scale.
|
|
4205
|
-
var x1 = common.scaleLinear()
|
|
4206
|
-
.domain([0, Math.max(rangez[0], markerz[0], measurez[0])])
|
|
4207
|
-
.range(reverse ? [extentX, 0] : [0, extentX]);
|
|
4208
|
-
|
|
4209
|
-
// Retrieve the old x-scale, if this is an update.
|
|
4210
|
-
var x0 = this.__chart__ || common.scaleLinear()
|
|
4211
|
-
.domain([0, Infinity])
|
|
4212
|
-
.range(x1.range());
|
|
4213
|
-
|
|
4214
|
-
// Stash the new scale.
|
|
4215
|
-
this.__chart__ = x1;
|
|
4216
|
-
|
|
4217
|
-
// Derive width-scales from the x-scales.
|
|
4218
|
-
var w0 = bulvarWidth(x0),
|
|
4219
|
-
w1 = bulvarWidth(x1);
|
|
4220
|
-
|
|
4221
|
-
// Update the range rects.
|
|
4222
|
-
var range = wrap.selectAll("rect.range")
|
|
4223
|
-
.data(rangez);
|
|
4224
|
-
|
|
4225
|
-
range.enter().append("rect")
|
|
4226
|
-
.attr("class", function (_d, i2) { return "range s" + i2; })
|
|
4227
|
-
.attr("width", w0)
|
|
4228
|
-
.attr("height", extentY)
|
|
4229
|
-
.attr("x", reverse ? x0 : 0)
|
|
4230
|
-
.merge(range)
|
|
4231
|
-
.transition(range)
|
|
4232
|
-
.attr("x", reverse ? x1 : 0)
|
|
4233
|
-
.attr("width", w1)
|
|
4234
|
-
.attr("height", extentY);
|
|
4235
|
-
|
|
4236
|
-
// Update the measure rects.
|
|
4237
|
-
var measure = wrap.selectAll("rect.measure")
|
|
4238
|
-
.data(measurez);
|
|
4239
|
-
|
|
4240
|
-
measure.enter().append("rect")
|
|
4241
|
-
.attr("class", function (_d, i2) { return "measure s" + i2; })
|
|
4242
|
-
.attr("width", w0)
|
|
4243
|
-
.attr("height", extentY / 3)
|
|
4244
|
-
.attr("x", reverse ? x0 : 0)
|
|
4245
|
-
.attr("y", extentY / 3)
|
|
4246
|
-
.merge(measure)
|
|
4247
|
-
.transition(measure)
|
|
4248
|
-
.attr("width", w1)
|
|
4249
|
-
.attr("height", extentY / 3)
|
|
4250
|
-
.attr("x", reverse ? x1 : 0)
|
|
4251
|
-
.attr("y", extentY / 3);
|
|
4252
|
-
|
|
4253
|
-
// Update the marker lines.
|
|
4254
|
-
var marker = wrap.selectAll("line.marker")
|
|
4255
|
-
.data(markerz);
|
|
4256
|
-
|
|
4257
|
-
marker.enter().append("line")
|
|
4258
|
-
.attr("class", "marker")
|
|
4259
|
-
.attr("x1", x0)
|
|
4260
|
-
.attr("x2", x0)
|
|
4261
|
-
.attr("y1", extentY / 6)
|
|
4262
|
-
.attr("y2", extentY * 5 / 6)
|
|
4263
|
-
.merge(marker)
|
|
4264
|
-
.transition(marker)
|
|
4265
|
-
.attr("x1", x1)
|
|
4266
|
-
.attr("x2", x1)
|
|
4267
|
-
.attr("y1", extentY / 6)
|
|
4268
|
-
.attr("y2", extentY * 5 / 6);
|
|
4269
|
-
|
|
4270
|
-
var axis = g2.selectAll("g.axis").data([0]);
|
|
4271
|
-
axis.enter().append("g").attr("class", "axis");
|
|
4272
|
-
axis.attr("transform", vertical ? null : "translate(0," + extentY + ")")
|
|
4273
|
-
.call(xAxis.scale(x1));
|
|
4274
|
-
});
|
|
4275
|
-
timerFlush();
|
|
4276
|
-
}
|
|
4277
|
-
|
|
4278
|
-
// left, right, top, bottom
|
|
4279
|
-
bulvar.orient = function (_) {
|
|
4280
|
-
if (!arguments.length) return orient;
|
|
4281
|
-
orient = _ + "";
|
|
4282
|
-
reverse = orient === "right" || orient === "bottom";
|
|
4283
|
-
xAxis.orient((vertical = orient === "top" || orient === "bottom") ? "left" : "bottom");
|
|
4284
|
-
return bulvar;
|
|
4285
|
-
};
|
|
4286
|
-
|
|
4287
|
-
// ranges (bad, satisfactory, good)
|
|
4288
|
-
bulvar.ranges = function (_) {
|
|
4289
|
-
if (!arguments.length) return ranges;
|
|
4290
|
-
ranges = _;
|
|
4291
|
-
return bulvar;
|
|
4292
|
-
};
|
|
4293
|
-
|
|
4294
|
-
// markers (previous, goal)
|
|
4295
|
-
bulvar.markers = function (_) {
|
|
4296
|
-
if (!arguments.length) return markers;
|
|
4297
|
-
markers = _;
|
|
4298
|
-
return bulvar;
|
|
4299
|
-
};
|
|
4300
|
-
|
|
4301
|
-
// measures (actual, forecast)
|
|
4302
|
-
bulvar.measures = function (_) {
|
|
4303
|
-
if (!arguments.length) return measures;
|
|
4304
|
-
measures = _;
|
|
4305
|
-
return bulvar;
|
|
4306
|
-
};
|
|
4307
|
-
|
|
4308
|
-
bulvar.width = function (_) {
|
|
4309
|
-
if (!arguments.length) return width;
|
|
4310
|
-
width = +_;
|
|
4311
|
-
return bulvar;
|
|
4312
|
-
};
|
|
4313
|
-
|
|
4314
|
-
bulvar.height = function (_) {
|
|
4315
|
-
if (!arguments.length) return height;
|
|
4316
|
-
height = +_;
|
|
4317
|
-
return bulvar;
|
|
4318
|
-
};
|
|
4319
|
-
|
|
4320
|
-
bulvar.tickFormat = function (_) {
|
|
4321
|
-
if (!arguments.length) return xAxis.tickFormat();
|
|
4322
|
-
xAxis.tickFormat(_);
|
|
4323
|
-
return bulvar;
|
|
4324
|
-
};
|
|
4325
|
-
|
|
4326
|
-
return bulvar;
|
|
4327
|
-
}
|
|
4328
|
-
|
|
4329
|
-
function bulvarRanges(d) {
|
|
4330
|
-
return d.ranges;
|
|
4331
|
-
}
|
|
4332
|
-
|
|
4333
|
-
function bulvarMarkers(d) {
|
|
4334
|
-
return d.markers;
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
|
-
function bulvarMeasures(d) {
|
|
4338
|
-
return d.measures;
|
|
4339
|
-
}
|
|
4340
|
-
|
|
4341
|
-
function bulvarWidth(x) {
|
|
4342
|
-
var x0 = x(0);
|
|
4343
|
-
return function (d) {
|
|
4344
|
-
return Math.abs(x(d) - x0);
|
|
4345
|
-
};
|
|
4172
|
+
function d3Bullet () {
|
|
4173
|
+
var orient = "left",
|
|
4174
|
+
reverse = false,
|
|
4175
|
+
vertical = false,
|
|
4176
|
+
ranges = bulvarRanges,
|
|
4177
|
+
markers = bulvarMarkers,
|
|
4178
|
+
measures = bulvarMeasures,
|
|
4179
|
+
width = 380,
|
|
4180
|
+
height = 30,
|
|
4181
|
+
xAxis = axisLeft();
|
|
4182
|
+
|
|
4183
|
+
// For each small multiple…
|
|
4184
|
+
function bulvar(g) {
|
|
4185
|
+
g.each(function (d, i) {
|
|
4186
|
+
var rangez = ranges.call(this, d, i).slice().sort(common.descending),
|
|
4187
|
+
markerz = markers.call(this, d, i).slice().sort(common.descending),
|
|
4188
|
+
measurez = measures.call(this, d, i).slice().sort(common.descending),
|
|
4189
|
+
g2 = common.select(this),
|
|
4190
|
+
extentX,
|
|
4191
|
+
extentY;
|
|
4192
|
+
|
|
4193
|
+
var wrap = g2.select("g.wrap");
|
|
4194
|
+
if (wrap.empty()) wrap = g2.append("g").attr("class", "wrap");
|
|
4195
|
+
|
|
4196
|
+
if (vertical) {
|
|
4197
|
+
extentX = height, extentY = width;
|
|
4198
|
+
wrap.attr("transform", "rotate(90)translate(0," + -width + ")");
|
|
4199
|
+
} else {
|
|
4200
|
+
extentX = width, extentY = height;
|
|
4201
|
+
wrap.attr("transform", null);
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
// Compute the new x-scale.
|
|
4205
|
+
var x1 = common.scaleLinear()
|
|
4206
|
+
.domain([0, Math.max(rangez[0], markerz[0], measurez[0])])
|
|
4207
|
+
.range(reverse ? [extentX, 0] : [0, extentX]);
|
|
4208
|
+
|
|
4209
|
+
// Retrieve the old x-scale, if this is an update.
|
|
4210
|
+
var x0 = this.__chart__ || common.scaleLinear()
|
|
4211
|
+
.domain([0, Infinity])
|
|
4212
|
+
.range(x1.range());
|
|
4213
|
+
|
|
4214
|
+
// Stash the new scale.
|
|
4215
|
+
this.__chart__ = x1;
|
|
4216
|
+
|
|
4217
|
+
// Derive width-scales from the x-scales.
|
|
4218
|
+
var w0 = bulvarWidth(x0),
|
|
4219
|
+
w1 = bulvarWidth(x1);
|
|
4220
|
+
|
|
4221
|
+
// Update the range rects.
|
|
4222
|
+
var range = wrap.selectAll("rect.range")
|
|
4223
|
+
.data(rangez);
|
|
4224
|
+
|
|
4225
|
+
range.enter().append("rect")
|
|
4226
|
+
.attr("class", function (_d, i2) { return "range s" + i2; })
|
|
4227
|
+
.attr("width", w0)
|
|
4228
|
+
.attr("height", extentY)
|
|
4229
|
+
.attr("x", reverse ? x0 : 0)
|
|
4230
|
+
.merge(range)
|
|
4231
|
+
.transition(range)
|
|
4232
|
+
.attr("x", reverse ? x1 : 0)
|
|
4233
|
+
.attr("width", w1)
|
|
4234
|
+
.attr("height", extentY);
|
|
4235
|
+
|
|
4236
|
+
// Update the measure rects.
|
|
4237
|
+
var measure = wrap.selectAll("rect.measure")
|
|
4238
|
+
.data(measurez);
|
|
4239
|
+
|
|
4240
|
+
measure.enter().append("rect")
|
|
4241
|
+
.attr("class", function (_d, i2) { return "measure s" + i2; })
|
|
4242
|
+
.attr("width", w0)
|
|
4243
|
+
.attr("height", extentY / 3)
|
|
4244
|
+
.attr("x", reverse ? x0 : 0)
|
|
4245
|
+
.attr("y", extentY / 3)
|
|
4246
|
+
.merge(measure)
|
|
4247
|
+
.transition(measure)
|
|
4248
|
+
.attr("width", w1)
|
|
4249
|
+
.attr("height", extentY / 3)
|
|
4250
|
+
.attr("x", reverse ? x1 : 0)
|
|
4251
|
+
.attr("y", extentY / 3);
|
|
4252
|
+
|
|
4253
|
+
// Update the marker lines.
|
|
4254
|
+
var marker = wrap.selectAll("line.marker")
|
|
4255
|
+
.data(markerz);
|
|
4256
|
+
|
|
4257
|
+
marker.enter().append("line")
|
|
4258
|
+
.attr("class", "marker")
|
|
4259
|
+
.attr("x1", x0)
|
|
4260
|
+
.attr("x2", x0)
|
|
4261
|
+
.attr("y1", extentY / 6)
|
|
4262
|
+
.attr("y2", extentY * 5 / 6)
|
|
4263
|
+
.merge(marker)
|
|
4264
|
+
.transition(marker)
|
|
4265
|
+
.attr("x1", x1)
|
|
4266
|
+
.attr("x2", x1)
|
|
4267
|
+
.attr("y1", extentY / 6)
|
|
4268
|
+
.attr("y2", extentY * 5 / 6);
|
|
4269
|
+
|
|
4270
|
+
var axis = g2.selectAll("g.axis").data([0]);
|
|
4271
|
+
axis.enter().append("g").attr("class", "axis");
|
|
4272
|
+
axis.attr("transform", vertical ? null : "translate(0," + extentY + ")")
|
|
4273
|
+
.call(xAxis.scale(x1));
|
|
4274
|
+
});
|
|
4275
|
+
timerFlush();
|
|
4276
|
+
}
|
|
4277
|
+
|
|
4278
|
+
// left, right, top, bottom
|
|
4279
|
+
bulvar.orient = function (_) {
|
|
4280
|
+
if (!arguments.length) return orient;
|
|
4281
|
+
orient = _ + "";
|
|
4282
|
+
reverse = orient === "right" || orient === "bottom";
|
|
4283
|
+
xAxis.orient((vertical = orient === "top" || orient === "bottom") ? "left" : "bottom"); // eslint-disable-line
|
|
4284
|
+
return bulvar;
|
|
4285
|
+
};
|
|
4286
|
+
|
|
4287
|
+
// ranges (bad, satisfactory, good)
|
|
4288
|
+
bulvar.ranges = function (_) {
|
|
4289
|
+
if (!arguments.length) return ranges;
|
|
4290
|
+
ranges = _;
|
|
4291
|
+
return bulvar;
|
|
4292
|
+
};
|
|
4293
|
+
|
|
4294
|
+
// markers (previous, goal)
|
|
4295
|
+
bulvar.markers = function (_) {
|
|
4296
|
+
if (!arguments.length) return markers;
|
|
4297
|
+
markers = _;
|
|
4298
|
+
return bulvar;
|
|
4299
|
+
};
|
|
4300
|
+
|
|
4301
|
+
// measures (actual, forecast)
|
|
4302
|
+
bulvar.measures = function (_) {
|
|
4303
|
+
if (!arguments.length) return measures;
|
|
4304
|
+
measures = _;
|
|
4305
|
+
return bulvar;
|
|
4306
|
+
};
|
|
4307
|
+
|
|
4308
|
+
bulvar.width = function (_) {
|
|
4309
|
+
if (!arguments.length) return width;
|
|
4310
|
+
width = +_;
|
|
4311
|
+
return bulvar;
|
|
4312
|
+
};
|
|
4313
|
+
|
|
4314
|
+
bulvar.height = function (_) {
|
|
4315
|
+
if (!arguments.length) return height;
|
|
4316
|
+
height = +_;
|
|
4317
|
+
return bulvar;
|
|
4318
|
+
};
|
|
4319
|
+
|
|
4320
|
+
bulvar.tickFormat = function (_) {
|
|
4321
|
+
if (!arguments.length) return xAxis.tickFormat();
|
|
4322
|
+
xAxis.tickFormat(_);
|
|
4323
|
+
return bulvar;
|
|
4324
|
+
};
|
|
4325
|
+
|
|
4326
|
+
return bulvar;
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4329
|
+
function bulvarRanges(d) {
|
|
4330
|
+
return d.ranges;
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
function bulvarMarkers(d) {
|
|
4334
|
+
return d.markers;
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
function bulvarMeasures(d) {
|
|
4338
|
+
return d.measures;
|
|
4339
|
+
}
|
|
4340
|
+
|
|
4341
|
+
function bulvarWidth(x) {
|
|
4342
|
+
var x0 = x(0);
|
|
4343
|
+
return function (d) {
|
|
4344
|
+
return Math.abs(x(d) - x0);
|
|
4345
|
+
};
|
|
4346
4346
|
}
|
|
4347
4347
|
|
|
4348
4348
|
var css_248z$7 = ".chart_Bullet .domain{opacity:0}.chart_Bullet .bullet{border:1px solid transparent;font:10px sans-serif}.chart_Bullet .bullet.selected{border-color:red}.chart_Bullet .bullet.over{border-color:orange}.chart_Bullet .bullet.selected.over{border-color:red}.chart_Bullet .bullet .marker{stroke:#000;stroke-width:2px}.chart_Bullet .bullet .tick line{stroke:#666;stroke-width:.5px}.chart_Bullet .bullet .range.s0{fill:#eee}.chart_Bullet .bullet .range.s1{fill:#ddd}.chart_Bullet .bullet .range.s2{fill:#ccc}.chart_Bullet .bullet .measure.s0{fill:#b0c4de}.chart_Bullet .bullet .measure.s1{fill:#4682b4}.chart_Bullet .bullet .title{font-size:14px;font-weight:700}.chart_Bullet .bullet .subtitle{fill:#999}";
|