victory-histogram 37.1.0 → 37.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # victory-histogram
2
2
 
3
+ ## 37.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix victory-native container styles ([`eae3fe5dd`](https://github.com/FormidableLabs/victory/commit/eae3fe5dde175e68e146576655cb2e8054ad6456))
8
+
9
+ ## 37.1.1
10
+
3
11
  ## 37.1.0
4
12
 
5
13
  ### Minor Changes
@@ -7182,6 +7182,432 @@ const TSpan = props => {
7182
7182
 
7183
7183
  /***/ }),
7184
7184
 
7185
+ /***/ "../../victory-core/es/victory-theme/clean.js":
7186
+ /*!****************************************************!*\
7187
+ !*** ../../victory-core/es/victory-theme/clean.js ***!
7188
+ \****************************************************/
7189
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7190
+
7191
+ "use strict";
7192
+ __webpack_require__.r(__webpack_exports__);
7193
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7194
+ /* harmony export */ "clean": function() { return /* binding */ clean; }
7195
+ /* harmony export */ });
7196
+ // *
7197
+ // * Colors
7198
+ // *
7199
+
7200
+ const gray = {
7201
+ white: "#FFFFFF",
7202
+ "50": "#FAFAFA",
7203
+ "100": "#F2F2F2",
7204
+ "200": "#E8E8E8",
7205
+ "300": "#E0E0E0",
7206
+ "400": "#D1D1D1",
7207
+ "500": "#757575",
7208
+ "600": "#5C5C5C",
7209
+ "700": "#424242",
7210
+ "800": "#333333",
7211
+ "900": "#292929",
7212
+ black: "#0F0F0F"
7213
+ };
7214
+ const yellow = {
7215
+ "100": "#FFEAB6",
7216
+ "300": "#FFD66E",
7217
+ "500": "#FCB400",
7218
+ "900": "#B87503"
7219
+ };
7220
+ const orange = {
7221
+ "100": "#FEE2D5",
7222
+ "300": "#FFA981",
7223
+ "500": "#FF6F2C",
7224
+ "900": "#D74D26"
7225
+ };
7226
+ const red = {
7227
+ "100": "#FFDCE5",
7228
+ "300": "#FF9EB7",
7229
+ "500": "#F82B60",
7230
+ "900": "#BA1E45"
7231
+ };
7232
+ const pink = {
7233
+ "100": "#FFDAF6",
7234
+ "300": "#F99DE2",
7235
+ "500": "#FF08C2",
7236
+ "900": "#B2158B"
7237
+ };
7238
+ const purple = {
7239
+ "100": "#EDE3FE",
7240
+ "300": "#CDB0FF",
7241
+ "500": "#8B46FF",
7242
+ "900": "#6B1CB0"
7243
+ };
7244
+ const blue = {
7245
+ "100": "#CFDFFF",
7246
+ "300": "#9CC7FF",
7247
+ "500": "#2D7FF9",
7248
+ "900": "#2750AE"
7249
+ };
7250
+ const cyan = {
7251
+ "100": "#D0F0FD",
7252
+ "300": "#77D1F3",
7253
+ "500": "#18BFFF",
7254
+ "900": "#0B76B7"
7255
+ };
7256
+ const teal = {
7257
+ "100": "#C2F5E9",
7258
+ "300": "#72DDC3",
7259
+ "500": "#20D9D2",
7260
+ "900": "#06A09B"
7261
+ };
7262
+ const green = {
7263
+ "100": "#D1F7C4",
7264
+ "300": "#93E088",
7265
+ "500": "#20C933",
7266
+ "900": "#338A17"
7267
+ };
7268
+ const colors = [blue["500"], pink["500"], teal["500"], purple["500"], green["500"], orange["500"], cyan["500"], red["500"], yellow["500"]];
7269
+ // *
7270
+ // * Typography
7271
+ // *
7272
+ const sansSerif = "'Inter', 'Helvetica Neue', 'Seravek', 'Helvetica', sans-serif";
7273
+ const letterSpacing = "normal";
7274
+ const fontSize = 12;
7275
+ // *
7276
+ // * Layout
7277
+ // *
7278
+ const padding = 8;
7279
+ const baseProps = {
7280
+ width: 450,
7281
+ height: 300,
7282
+ padding: 50,
7283
+ colorScale: colors
7284
+ };
7285
+ // *
7286
+ // * Labels
7287
+ // *
7288
+ const baseLabelStyles = {
7289
+ fontFamily: sansSerif,
7290
+ fontSize,
7291
+ fontWeight: 300,
7292
+ letterSpacing,
7293
+ padding,
7294
+ fill: gray["900"],
7295
+ stroke: "transparent"
7296
+ };
7297
+ const centeredLabelStyles = Object.assign({
7298
+ textAnchor: "middle"
7299
+ }, baseLabelStyles);
7300
+
7301
+ // *
7302
+ // * Strokes
7303
+ // *
7304
+ const strokeDasharray = "10, 5";
7305
+ const strokeLinecap = "round";
7306
+ const strokeLinejoin = "round";
7307
+ const borderRadius = 1;
7308
+ // *
7309
+ // * Theme
7310
+ // *
7311
+ const clean = {
7312
+ area: Object.assign({
7313
+ style: {
7314
+ data: {
7315
+ fill: cyan["500"]
7316
+ },
7317
+ labels: baseLabelStyles
7318
+ }
7319
+ }, baseProps),
7320
+ axis: Object.assign({
7321
+ style: {
7322
+ axis: {
7323
+ fill: "transparent",
7324
+ stroke: gray["300"],
7325
+ strokeWidth: 1,
7326
+ strokeLinecap,
7327
+ strokeLinejoin
7328
+ },
7329
+ axisLabel: Object.assign({}, centeredLabelStyles, {
7330
+ padding,
7331
+ stroke: "transparent"
7332
+ }),
7333
+ grid: {
7334
+ fill: "none",
7335
+ stroke: "none",
7336
+ painterEvents: "painted"
7337
+ },
7338
+ ticks: {
7339
+ fill: "transparent",
7340
+ size: 5,
7341
+ stroke: "transparent"
7342
+ },
7343
+ tickLabels: baseLabelStyles
7344
+ }
7345
+ }, baseProps),
7346
+ polarAxis: Object.assign({
7347
+ style: {
7348
+ axis: {
7349
+ stroke: gray["300"]
7350
+ },
7351
+ grid: {
7352
+ stroke: gray["200"],
7353
+ strokeDasharray,
7354
+ strokeLinecap,
7355
+ strokeLinejoin,
7356
+ pointerEvents: "painted"
7357
+ },
7358
+ ticks: {
7359
+ fill: "transparent",
7360
+ size: 5,
7361
+ stroke: gray["200"],
7362
+ strokeWidth: 1,
7363
+ strokeLinecap,
7364
+ strokeLinejoin
7365
+ },
7366
+ tickLabels: baseLabelStyles
7367
+ }
7368
+ }),
7369
+ polarDependentAxis: Object.assign({
7370
+ style: {
7371
+ axis: {
7372
+ stroke: gray["300"]
7373
+ },
7374
+ grid: {
7375
+ stroke: gray["200"],
7376
+ strokeDasharray,
7377
+ strokeLinecap,
7378
+ strokeLinejoin,
7379
+ pointerEvents: "painted"
7380
+ },
7381
+ ticks: {
7382
+ fill: "transparent",
7383
+ size: 5,
7384
+ stroke: gray["200"],
7385
+ strokeWidth: 1,
7386
+ strokeLinecap,
7387
+ strokeLinejoin
7388
+ },
7389
+ tickLabels: baseLabelStyles
7390
+ }
7391
+ }),
7392
+ bar: Object.assign({
7393
+ style: {
7394
+ data: {
7395
+ fill: blue["500"],
7396
+ padding,
7397
+ strokeWidth: 0
7398
+ },
7399
+ labels: baseLabelStyles
7400
+ },
7401
+ cornerRadius: {
7402
+ top: borderRadius
7403
+ }
7404
+ }, baseProps),
7405
+ boxplot: Object.assign({
7406
+ style: {
7407
+ max: {
7408
+ padding,
7409
+ stroke: gray["400"],
7410
+ strokeWidth: 2
7411
+ },
7412
+ maxLabels: Object.assign({}, baseLabelStyles, {
7413
+ padding: 3
7414
+ }),
7415
+ median: {
7416
+ padding,
7417
+ stroke: gray.white,
7418
+ strokeWidth: 2
7419
+ },
7420
+ medianLabels: Object.assign({}, baseLabelStyles, {
7421
+ padding: 3
7422
+ }),
7423
+ min: {
7424
+ padding,
7425
+ stroke: gray["400"],
7426
+ strokeWidth: 2
7427
+ },
7428
+ minLabels: Object.assign({}, baseLabelStyles, {
7429
+ padding: 3
7430
+ }),
7431
+ q1: {
7432
+ padding,
7433
+ fill: teal["500"],
7434
+ rx: borderRadius
7435
+ },
7436
+ q1Labels: Object.assign({}, baseLabelStyles, {
7437
+ padding: 3
7438
+ }),
7439
+ q3: {
7440
+ padding,
7441
+ fill: teal["500"],
7442
+ rx: borderRadius
7443
+ },
7444
+ q3Labels: Object.assign({}, baseLabelStyles, {
7445
+ padding: 3
7446
+ })
7447
+ },
7448
+ boxWidth: 20
7449
+ }, baseProps),
7450
+ candlestick: Object.assign({
7451
+ style: {
7452
+ data: {
7453
+ stroke: gray["300"],
7454
+ strokeWidth: 0,
7455
+ rx: borderRadius
7456
+ },
7457
+ labels: Object.assign({}, baseLabelStyles, {
7458
+ padding: 5
7459
+ })
7460
+ },
7461
+ candleColors: {
7462
+ positive: teal["500"],
7463
+ negative: orange["500"]
7464
+ },
7465
+ wickStrokeWidth: 2
7466
+ }, baseProps),
7467
+ chart: baseProps,
7468
+ errorbar: Object.assign({
7469
+ borderWidth: 8,
7470
+ style: {
7471
+ data: {
7472
+ fill: "transparent",
7473
+ opacity: 1,
7474
+ stroke: gray["700"],
7475
+ strokeWidth: 2,
7476
+ strokeLinecap
7477
+ },
7478
+ labels: baseLabelStyles
7479
+ }
7480
+ }, baseProps),
7481
+ group: Object.assign({
7482
+ colorScale: colors
7483
+ }, baseProps),
7484
+ histogram: Object.assign({
7485
+ style: {
7486
+ data: {
7487
+ fill: cyan["500"],
7488
+ stroke: "transparent",
7489
+ strokeWidth: 0
7490
+ },
7491
+ labels: baseLabelStyles
7492
+ },
7493
+ binSpacing: 4,
7494
+ cornerRadius: {
7495
+ top: borderRadius
7496
+ }
7497
+ }, baseProps),
7498
+ label: baseLabelStyles,
7499
+ legend: {
7500
+ colorScale: colors,
7501
+ gutter: 10,
7502
+ orientation: "vertical",
7503
+ titleOrientation: "top",
7504
+ style: {
7505
+ data: {
7506
+ type: "circle"
7507
+ },
7508
+ labels: {
7509
+ ...baseLabelStyles,
7510
+ fontSize: 14
7511
+ },
7512
+ title: Object.assign({}, baseLabelStyles, {
7513
+ padding,
7514
+ fontSize: 20
7515
+ }),
7516
+ border: {
7517
+ stroke: gray["200"],
7518
+ strokeWidth: 2,
7519
+ padding: 16
7520
+ }
7521
+ }
7522
+ },
7523
+ line: Object.assign({
7524
+ style: {
7525
+ data: {
7526
+ fill: "transparent",
7527
+ opacity: 1,
7528
+ stroke: pink["500"],
7529
+ strokeWidth: 2,
7530
+ strokeLinecap,
7531
+ strokeLinejoin
7532
+ },
7533
+ labels: baseLabelStyles
7534
+ }
7535
+ }, baseProps),
7536
+ pie: Object.assign({
7537
+ style: {
7538
+ data: {
7539
+ padding,
7540
+ stroke: gray.white,
7541
+ strokeWidth: 1
7542
+ },
7543
+ labels: Object.assign({}, baseLabelStyles, {
7544
+ padding: 20
7545
+ })
7546
+ },
7547
+ colorScale: colors,
7548
+ cornerRadius: borderRadius
7549
+ }, baseProps),
7550
+ scatter: Object.assign({
7551
+ style: {
7552
+ data: {
7553
+ fill: purple["500"],
7554
+ opacity: 1,
7555
+ stroke: "transparent",
7556
+ strokeWidth: 0
7557
+ },
7558
+ labels: baseLabelStyles
7559
+ }
7560
+ }, baseProps),
7561
+ stack: Object.assign({
7562
+ colorScale: colors
7563
+ }, baseProps),
7564
+ tooltip: {
7565
+ style: Object.assign({}, baseLabelStyles, {
7566
+ padding: 0,
7567
+ pointerEvents: "none"
7568
+ }),
7569
+ flyoutStyle: {
7570
+ stroke: gray["500"],
7571
+ strokeWidth: 2,
7572
+ fill: gray.white,
7573
+ pointerEvents: "none"
7574
+ },
7575
+ flyoutPadding: {
7576
+ top: 8,
7577
+ bottom: 8,
7578
+ left: 16,
7579
+ right: 16
7580
+ },
7581
+ cornerRadius: borderRadius,
7582
+ pointerLength: 4
7583
+ },
7584
+ voronoi: Object.assign({
7585
+ style: {
7586
+ data: {
7587
+ fill: red["100"],
7588
+ stroke: red["500"],
7589
+ strokeWidth: 2
7590
+ },
7591
+ labels: Object.assign({}, baseLabelStyles, {
7592
+ padding: 5,
7593
+ pointerEvents: "none"
7594
+ }),
7595
+ flyout: {
7596
+ stroke: gray["900"],
7597
+ strokeWidth: 1,
7598
+ fill: gray["100"],
7599
+ pointerEvents: "none"
7600
+ },
7601
+ padding: {
7602
+ left: 2,
7603
+ bottom: 2
7604
+ }
7605
+ }
7606
+ }, baseProps)
7607
+ };
7608
+
7609
+ /***/ }),
7610
+
7185
7611
  /***/ "../../victory-core/es/victory-theme/grayscale.js":
7186
7612
  /*!********************************************************!*\
7187
7613
  !*** ../../victory-core/es/victory-theme/grayscale.js ***!
@@ -7762,12 +8188,15 @@ __webpack_require__.r(__webpack_exports__);
7762
8188
  /* harmony export */ });
7763
8189
  /* harmony import */ var _grayscale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grayscale */ "../../victory-core/es/victory-theme/grayscale.js");
7764
8190
  /* harmony import */ var _material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./material */ "../../victory-core/es/victory-theme/material.js");
8191
+ /* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./clean */ "../../victory-core/es/victory-theme/clean.js");
8192
+
7765
8193
 
7766
8194
 
7767
8195
 
7768
8196
  const VictoryTheme = {
7769
8197
  grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
7770
- material: _material__WEBPACK_IMPORTED_MODULE_1__.material
8198
+ material: _material__WEBPACK_IMPORTED_MODULE_1__.material,
8199
+ clean: _clean__WEBPACK_IMPORTED_MODULE_2__.clean
7771
8200
  };
7772
8201
 
7773
8202
  /***/ }),
@@ -10644,6 +11073,7 @@ __webpack_require__.r(__webpack_exports__);
10644
11073
  /* eslint-disable no-magic-numbers */
10645
11074
  // Based on measuring specific character widths
10646
11075
  // as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
11076
+ // For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
10647
11077
  // prettier-ignore
10648
11078
  const fonts = {
10649
11079
  "American Typewriter": {
@@ -10702,6 +11132,10 @@ const fonts = {
10702
11132
  widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2359375, 0.2234375, 0.3921875, 0.7125, 0.49375, 0.8859375, 0.771875, 0.2125, 0.3078125, 0.309375, 0.375, 0.4234375, 0.234375, 0.3125, 0.234375, 0.3, 0.5828125, 0.365625, 0.434375, 0.3921875, 0.5234375, 0.3984375, 0.5125, 0.4328125, 0.46875, 0.5125, 0.234375, 0.234375, 0.515625, 0.4234375, 0.515625, 0.340625, 0.7609375, 0.7359375, 0.6359375, 0.721875, 0.8125, 0.6375, 0.5875, 0.8078125, 0.853125, 0.4296875, 0.503125, 0.78125, 0.609375, 0.9609375, 0.8515625, 0.8140625, 0.6125, 0.8140625, 0.71875, 0.49375, 0.7125, 0.76875, 0.771875, 1.125, 0.7765625, 0.7734375, 0.65625, 0.321875, 0.3078125, 0.321875, 0.3546875, 0.5, 0.3375, 0.446875, 0.5359375, 0.45, 0.5296875, 0.4546875, 0.425, 0.4921875, 0.54375, 0.2671875, 0.240625, 0.5390625, 0.25, 0.815625, 0.5375, 0.5234375, 0.5390625, 0.5421875, 0.365625, 0.36875, 0.35625, 0.5171875, 0.5015625, 0.75, 0.5, 0.509375, 0.44375, 0.2421875, 0.14375, 0.2421875, 0.35],
10703
11133
  avg: 0.5116447368421051
10704
11134
  },
11135
+ "Inter": {
11136
+ widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2796875, 0.2890625, 0.4671875, 0.634375, 0.6421875, 0.9828125, 0.6453125, 0.3, 0.365625, 0.365625, 0.5015625, 0.6625, 0.2890625, 0.4609375, 0.2890625, 0.3609375, 0.63125, 0.4078125, 0.6109375, 0.61875, 0.646875, 0.59375, 0.6203125, 0.5671875, 0.61875, 0.6203125, 0.2890625, 0.303125, 0.6625, 0.6625, 0.6625, 0.5125, 0.9671875, 0.690625, 0.6546875, 0.73125, 0.721875, 0.6015625, 0.590625, 0.746875, 0.74375, 0.26875, 0.571875, 0.671875, 0.565625, 0.9046875, 0.7546875, 0.765625, 0.6390625, 0.765625, 0.64375, 0.6421875, 0.646875, 0.7453125, 0.690625, 0.9859375, 0.6828125, 0.6796875, 0.6296875, 0.365625, 0.3609375, 0.365625, 0.471875, 0.45625, 0.3234375, 0.5625, 0.6125, 0.571875, 0.6125, 0.584375, 0.3703125, 0.6140625, 0.5921875, 0.2421875, 0.2548828125, 0.55, 0.2421875, 0.8765625, 0.5921875, 0.6, 0.6125, 0.6125, 0.3765625, 0.528125, 0.328125, 0.5921875, 0.5625, 0.81875, 0.546875, 0.5625, 0.553125, 0.4265625, 0.3328125, 0.4265625, 0.6625],
11137
+ avg: 0.5624362664473683
11138
+ },
10705
11139
  "Montserrat": {
10706
11140
  widths: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2625, 0.2609375, 0.3734375, 0.696875, 0.615625, 0.8296875, 0.6703125, 0.203125, 0.3296875, 0.3296875, 0.3875, 0.575, 0.2125, 0.3828125, 0.2125, 0.3953125, 0.6625, 0.3625, 0.56875, 0.5640625, 0.6625, 0.5671875, 0.609375, 0.5890625, 0.6390625, 0.609375, 0.2125, 0.2125, 0.575, 0.575, 0.575, 0.5671875, 1.034375, 0.7171875, 0.7546875, 0.7203125, 0.8265625, 0.6703125, 0.634375, 0.7734375, 0.8140625, 0.303125, 0.5078125, 0.7125, 0.5890625, 0.95625, 0.8140625, 0.8390625, 0.71875, 0.8390625, 0.7234375, 0.615625, 0.575, 0.7921875, 0.6984375, 1.1125, 0.65625, 0.6359375, 0.6515625, 0.31875, 0.396875, 0.31875, 0.5765625, 0.5, 0.6, 0.590625, 0.678125, 0.5640625, 0.678125, 0.6046875, 0.375, 0.6875, 0.678125, 0.2703125, 0.365625, 0.6015625, 0.2703125, 1.0625, 0.678125, 0.628125, 0.678125, 0.678125, 0.4015625, 0.4890625, 0.40625, 0.6734375, 0.5421875, 0.8796875, 0.534375, 0.5671875, 0.5125, 0.334375, 0.2953125, 0.334375, 0.575],
10707
11141
  avg: 0.571792763157895