billboard.js 3.7.2 → 3.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +9 -6
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +9 -6
  6. package/dist/billboard.pkgd.min.js +2 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2 -2
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +1 -1
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +1 -1
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +1 -1
  28. package/dist-esm/billboard.js +10 -7
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  34. package/package.json +8 -8
  35. package/src/ChartInternal/data/data.ts +4 -2
  36. package/src/ChartInternal/shape/bar.ts +5 -2
  37. package/types/chart.d.ts +3 -13
  38. package/types/options.d.ts +1 -1
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.7.2
8
+ * @version 3.7.3
9
9
  *
10
10
  * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11
11
  * - @types/d3-selection ^3.0.4
@@ -27004,7 +27004,8 @@ function getDataKeyForJson(keysParam, config) {
27004
27004
  }.bind(this));
27005
27005
  }
27006
27006
  }
27007
- d.ratio = isNumber(d.value) && total ? d.value / total[d.index] : 0;
27007
+ var divisor = total[d.index];
27008
+ d.ratio = isNumber(d.value) && total && divisor ? d.value / divisor : 0;
27008
27009
  ratio = d.ratio;
27009
27010
  } else if (type === "radar") {
27010
27011
  ratio = parseFloat(Math.max(d.value, 0) + "") / state.current.dataMax * config.radar_size_ratio;
@@ -44593,7 +44594,9 @@ function point_y(p) {
44593
44594
  var points = getPoints(d, i),
44594
44595
  indexX = +isRotated,
44595
44596
  indexY = +!indexX,
44596
- isNegative = d.value < 0,
44597
+ isUnderZero = d.value < 0,
44598
+ isInverted = config["axis_" + $$.axis.getId(d.id) + "_inverted"],
44599
+ isNegative = !isInverted && isUnderZero || isInverted && !isUnderZero,
44597
44600
  pathRadius = ["", ""]; // switch points if axis is rotated, not applicable for sub chart
44598
44601
  var radius = 0;
44599
44602
  var isGrouped = $$.isGrouped(d.id),
@@ -44610,7 +44613,7 @@ function point_y(p) {
44610
44613
 
44611
44614
  // path string data shouldn't be containing new line chars
44612
44615
  // https://github.com/naver/billboard.js/issues/530
44613
- var path = isRotated ? "H" + (points[1][indexX] - radius) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] : "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY];
44616
+ var path = isRotated ? "H" + (points[1][indexX] + (isNegative ? radius : -radius)) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] : "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY];
44614
44617
  return "M" + points[0][indexX] + "," + points[0][indexY] + path + "z";
44615
44618
  }.bind(this);
44616
44619
  },
@@ -50892,7 +50895,7 @@ var _defaults = {};
50892
50895
 
50893
50896
  /**
50894
50897
  * @namespace bb
50895
- * @version 3.7.2
50898
+ * @version 3.7.3
50896
50899
  */
50897
50900
  var bb = {
50898
50901
  /**
@@ -50902,7 +50905,7 @@ var bb = {
50902
50905
  * bb.version; // "1.0.0"
50903
50906
  * @memberof bb
50904
50907
  */
50905
- version: "3.7.2",
50908
+ version: "3.7.3",
50906
50909
  /**
50907
50910
  * Generate chart
50908
50911
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: