Browse Source

- Build

tags/1.5.4
Bart Van Houtte 4 years ago
parent
commit
b552cde7de
9 changed files with 15 additions and 13 deletions
  1. +7
    -5
      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
      docs/assets/js/frappe-charts.min.js
  9. +1
    -1
      docs/assets/js/frappe-charts.min.js.map

+ 7
- 5
dist/frappe-charts.esm.js View File

@@ -448,7 +448,7 @@ function getSplineCurvePointsStr(xList, yList) {
angle: Math.atan2(lengthY, lengthX) angle: Math.atan2(lengthY, lengthX)
}; };
}; };
let controlPoint = (current, previous, next, reverse) => { let controlPoint = (current, previous, next, reverse) => {
let p = previous || current; let p = previous || current;
let n = next || current; let n = next || current;
@@ -459,19 +459,19 @@ function getSplineCurvePointsStr(xList, yList) {
let y = current[1] + Math.sin(angle) * length; let y = current[1] + Math.sin(angle) * length;
return [x, y]; return [x, y];
}; };
let bezierCommand = (point, i, a) => { let bezierCommand = (point, i, a) => {
let cps = controlPoint(a[i - 1], a[i - 2], point); let cps = controlPoint(a[i - 1], a[i - 2], point);
let cpe = controlPoint(point, a[i - 1], a[i + 1], true); let cpe = controlPoint(point, a[i - 1], a[i + 1], true);
return `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`; return `C ${cps[0]},${cps[1]} ${cpe[0]},${cpe[1]} ${point[0]},${point[1]}`;
}; };
let pointStr = (points, command) => { let pointStr = (points, command) => {
return points.reduce((acc, point, i, a) => i === 0 return points.reduce((acc, point, i, a) => i === 0
? `${point[0]},${point[1]}` ? `${point[0]},${point[1]}`
: `${acc} ${command(point, i, a)}`, ''); : `${acc} ${command(point, i, a)}`, '');
}; };
return pointStr(points, bezierCommand); return pointStr(points, bezierCommand);
} }


@@ -1817,6 +1817,7 @@ class AggregationChart extends BaseChart {
configure(args) { configure(args) {
super.configure(args); super.configure(args);


this.config.formatTooltipY = args.tooltipOptions.formatTooltipY;
this.config.maxSlices = args.maxSlices || 20; this.config.maxSlices = args.maxSlices || 20;
this.config.maxLegendPoints = args.maxLegendPoints || 20; this.config.maxLegendPoints = args.maxLegendPoints || 20;
} }
@@ -1883,12 +1884,13 @@ class AggregationChart extends BaseChart {
} }
let x = barWidth * count + 5; let x = barWidth * count + 5;
let label = this.config.truncateLegends ? truncateString(s.labels[i], barWidth/10) : s.labels[i]; 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( let dot = legendDot(
x, x,
y, y,
5, 5,
this.colors[i], this.colors[i],
`${label}: ${d}`,
`${label}: ${formatted}`,
false false
); );
this.legendArea.appendChild(dot); this.legendArea.appendChild(dot);


+ 1
- 1
dist/frappe-charts.min.cjs.js
File diff suppressed because it is too large
View File


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


+ 1
- 1
dist/frappe-charts.min.esm.js
File diff suppressed because it is too large
View File


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


+ 1
- 1
dist/frappe-charts.min.iife.js
File diff suppressed because it is too large
View File


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


+ 1
- 1
docs/assets/js/frappe-charts.min.js
File diff suppressed because it is too large
View File


+ 1
- 1
docs/assets/js/frappe-charts.min.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save