Selaa lähdekoodia

chore: bump to 1.5.3 and update build

tags/1.5.3
Shivam Mishra 4 vuotta sitten
vanhempi
commit
92a3df9690
9 muutettua tiedostoa jossa 22 lisäystä ja 10 poistoa
  1. +14
    -2
      dist/frappe-charts.esm.js
  2. +1
    -1
      dist/frappe-charts.min.cjs.js
  3. +1
    -1
      dist/frappe-charts.min.cjs.js.map
  4. +1
    -1
      dist/frappe-charts.min.esm.js
  5. +1
    -1
      dist/frappe-charts.min.esm.js.map
  6. +1
    -1
      dist/frappe-charts.min.iife.js
  7. +1
    -1
      dist/frappe-charts.min.iife.js.map
  8. +1
    -1
      package.json
  9. +1
    -1
      src/js/index.js

+ 14
- 2
dist/frappe-charts.esm.js Näytä tiedosto

@@ -377,6 +377,16 @@ function isValidNumber(candidate, nonNegative=false) {
else return true;
}

/**
* Round a number to the closes precision, max max precision 4
* @param {Number} d Any Number
*/
function round(d) {
// https://floating-point-gui.de/
// https://www.jacklmoore.com/notes/rounding-in-javascript/
return Number(Math.round(d + 'e4') + 'e-4');
}

function getBarHeightAndYAttr(yTop, zeroLine) {
let height, y;
if (yTop <= zeroLine) {
@@ -1811,6 +1821,7 @@ class AggregationChart extends BaseChart {
configure(args) {
super.configure(args);

this.config.formatTooltipY = args.tooltipOptions.formatTooltipY;
this.config.maxSlices = args.maxSlices || 20;
this.config.maxLegendPoints = args.maxLegendPoints || 20;
}
@@ -1844,7 +1855,7 @@ class AggregationChart extends BaseChart {

s.labels = [];
totals.map(d => {
s.sliceTotals.push(d[0]);
s.sliceTotals.push(round(d[0]));
s.labels.push(d[1]);
});

@@ -1877,12 +1888,13 @@ class AggregationChart extends BaseChart {
}
let x = barWidth * count + 5;
let label = this.config.truncateLegends ? truncateString(s.labels[i], barWidth/10) : s.labels[i];
let formatted = this.config.formatTooltipY ? this.config.formatTooltipY(d) : d;
let dot = legendDot(
x,
y,
5,
this.colors[i],
`${label}: ${d}`,
`${label}: ${formatted}`,
false
);
this.legendArea.appendChild(dot);


+ 1
- 1
dist/frappe-charts.min.cjs.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
dist/frappe-charts.min.cjs.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
dist/frappe-charts.min.esm.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
dist/frappe-charts.min.esm.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
dist/frappe-charts.min.iife.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
dist/frappe-charts.min.iife.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
package.json Näytä tiedosto

@@ -1,6 +1,6 @@
{
"name": "frappe-charts",
"version": "1.5.2",
"version": "1.5.3",
"description": "https://frappe.github.io/charts",
"main": "dist/frappe-charts.min.cjs.js",
"module": "dist/frappe-charts.min.esm.js",


+ 1
- 1
src/js/index.js Näytä tiedosto

@@ -3,7 +3,7 @@ import * as Charts from './chart';
let frappe = { };

frappe.NAME = 'Frappe Charts';
frappe.VERSION = '1.5.2';
frappe.VERSION = '1.5.3';

frappe = Object.assign({ }, frappe, Charts);


Ladataan…
Peruuta
Tallenna