apexcharts
Advanced tools
Comparing version 3.41.0 to 3.41.1
{ | ||
"name": "apexcharts", | ||
"version": "3.41.0", | ||
"version": "3.41.1", | ||
"description": "A JavaScript Chart Library", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -61,3 +61,3 @@ import Annotations from './modules/annotations/Annotations' | ||
group: this.w.config.chart.group, | ||
chart: this | ||
chart: this, | ||
}) | ||
@@ -236,4 +236,4 @@ } | ||
width: w.globals.gridWidth, | ||
height: w.globals.gridHeight | ||
} | ||
height: w.globals.gridHeight, | ||
}, | ||
} | ||
@@ -244,3 +244,3 @@ | ||
xyRatios, | ||
dimensions: dim | ||
dimensions: dim, | ||
} | ||
@@ -270,4 +270,9 @@ } | ||
if (w.config.grid.position === 'back' && elgrid) { | ||
w.globals.dom.elGraphical.add(elgrid.el) | ||
if (w.config.grid.position === 'back') { | ||
if (elgrid) { | ||
w.globals.dom.elGraphical.add(elgrid.el) | ||
} | ||
if (elgrid?.elGridBorders?.node) { | ||
w.globals.dom.elGraphical.add(elgrid.elGridBorders) | ||
} | ||
} | ||
@@ -283,10 +288,11 @@ | ||
if (w.config.grid.position === 'front' && elgrid) { | ||
w.globals.dom.elGraphical.add(elgrid.el) | ||
if (w.config.grid.position === 'front') { | ||
if (elgrid) { | ||
w.globals.dom.elGraphical.add(elgrid.el) | ||
} | ||
if (elgrid?.elGridBorders?.node) { | ||
w.globals.dom.elGraphical.add(elgrid.elGridBorders) | ||
} | ||
} | ||
if (elgrid && elgrid.elGridBorders && elgrid.elGridBorders.node) { | ||
w.globals.dom.elGraphical.add(elgrid.elGridBorders) | ||
} | ||
if (w.config.xaxis.crosshairs.position === 'front') { | ||
@@ -337,3 +343,3 @@ me.crosshairs.drawXCrosshairs() | ||
me.zoomPanSelection.init({ | ||
xyRatios: graphData.xyRatios | ||
xyRatios: graphData.xyRatios, | ||
}) | ||
@@ -349,3 +355,3 @@ } | ||
'pan', | ||
'reset' | ||
'reset', | ||
] | ||
@@ -352,0 +358,0 @@ toolsArr.forEach((t) => { |
@@ -165,9 +165,7 @@ import BarDataLabels from './common/bar/DataLabels' | ||
let elGoalsMarkers = graphics.group({ | ||
class: 'apexcharts-bar-goals-markers', | ||
style: `pointer-events: none`, | ||
class: 'apexcharts-bar-goals-markers' | ||
}) | ||
let elBarShadows = graphics.group({ | ||
class: 'apexcharts-bar-shadows', | ||
style: `pointer-events: none`, | ||
class: 'apexcharts-bar-shadows' | ||
}) | ||
@@ -174,0 +172,0 @@ |
@@ -88,4 +88,3 @@ import CoreUtils from '../modules/CoreUtils' | ||
let elGoalsMarkers = this.graphics.group({ | ||
class: 'apexcharts-bar-goals-markers', | ||
style: `pointer-events: none`, | ||
class: 'apexcharts-bar-goals-markers' | ||
}) | ||
@@ -92,0 +91,0 @@ |
@@ -46,3 +46,3 @@ import CoreUtils from '../modules/CoreUtils' | ||
let ret = graphics.group({ | ||
class: `apexcharts-${type}-series apexcharts-plot-series` | ||
class: `apexcharts-${type}-series apexcharts-plot-series`, | ||
}) | ||
@@ -99,3 +99,3 @@ | ||
prevY, | ||
lineYPosition | ||
lineYPosition, | ||
}) | ||
@@ -114,3 +114,3 @@ prevY = firstPrevY.prevY | ||
prevY: prevY2, | ||
lineYPosition | ||
lineYPosition, | ||
}) | ||
@@ -128,3 +128,3 @@ prevY2 = firstPrevY2.prevY | ||
prevY, | ||
prevY2 | ||
prevY2, | ||
}) | ||
@@ -148,3 +148,3 @@ | ||
yArrj, | ||
seriesRangeEnd | ||
seriesRangeEnd, | ||
} | ||
@@ -155,3 +155,3 @@ | ||
iterations: type === 'rangeArea' ? series[i].length - 1 : undefined, | ||
isRangeStart: true | ||
isRangeStart: true, | ||
}) | ||
@@ -165,3 +165,3 @@ | ||
prevX, | ||
prevY: prevY2 | ||
prevY: prevY2, | ||
}) | ||
@@ -174,3 +174,3 @@ let rangePaths = this._iterateOverDataPoints({ | ||
iterations: seriesRangeEnd[i].length - 1, | ||
isRangeStart: false | ||
isRangeStart: false, | ||
}) | ||
@@ -244,3 +244,3 @@ | ||
class: `apexcharts-series`, | ||
seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]) | ||
seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]), | ||
}) | ||
@@ -251,3 +251,3 @@ | ||
class: 'apexcharts-series-markers-wrap', | ||
'data:realIndex': realIndex | ||
'data:realIndex': realIndex, | ||
}) | ||
@@ -258,3 +258,3 @@ | ||
class: 'apexcharts-datalabels', | ||
'data:realIndex': realIndex | ||
'data:realIndex': realIndex, | ||
}) | ||
@@ -266,3 +266,3 @@ | ||
rel: i + 1, | ||
'data:realIndex': realIndex | ||
'data:realIndex': realIndex, | ||
}) | ||
@@ -306,3 +306,3 @@ | ||
pathFromArea, | ||
realIndex | ||
realIndex, | ||
}) | ||
@@ -319,3 +319,3 @@ pathFromLine = pathFrom.pathFromLine | ||
pathFromLine, | ||
pathFromArea | ||
pathFromArea, | ||
} | ||
@@ -365,3 +365,3 @@ } | ||
el: this.elPointsMain.node, | ||
index: realIndex | ||
index: realIndex, | ||
}) | ||
@@ -376,3 +376,3 @@ } | ||
dataChangeSpeed: w.config.chart.animations.dynamicAnimation.speed, | ||
className: `apexcharts-${type}` | ||
className: `apexcharts-${type}`, | ||
} | ||
@@ -382,3 +382,3 @@ | ||
let pathFill = fill.fillPath({ | ||
seriesNumber: realIndex | ||
seriesNumber: realIndex, | ||
}) | ||
@@ -394,3 +394,3 @@ | ||
strokeLineCap: null, | ||
fill: pathFill | ||
fill: pathFill, | ||
}) | ||
@@ -407,3 +407,3 @@ | ||
seriesNumber: realIndex, | ||
i | ||
i, | ||
}) | ||
@@ -419,3 +419,3 @@ } else { | ||
seriesNumber: realIndex, | ||
i | ||
i, | ||
}) | ||
@@ -431,3 +431,3 @@ w.config.fill = prevFill | ||
pathFill = fill.fillPath({ | ||
seriesNumber: realIndex | ||
seriesNumber: realIndex, | ||
}) | ||
@@ -442,3 +442,3 @@ } | ||
strokeLineCap: w.config.stroke.lineCap, | ||
fill: type === 'rangeArea' ? pathFill : 'none' | ||
fill: type === 'rangeArea' ? pathFill : 'none', | ||
} | ||
@@ -496,3 +496,3 @@ let renderedPath = graphics.renderPaths(linePathCommonOpts) | ||
isRangeStart, | ||
seriesRangeEnd | ||
seriesRangeEnd, | ||
}) { | ||
@@ -592,3 +592,3 @@ const w = this.w | ||
j, | ||
prevY | ||
prevY, | ||
}) | ||
@@ -612,3 +612,3 @@ | ||
seriesIndex, | ||
isRangeStart | ||
isRangeStart, | ||
}) | ||
@@ -636,3 +636,3 @@ | ||
realIndex, | ||
isRangeStart | ||
isRangeStart, | ||
}) | ||
@@ -649,3 +649,3 @@ } | ||
linePath, | ||
areaPath | ||
areaPath, | ||
} | ||
@@ -677,3 +677,3 @@ } | ||
zRatio: this.zRatio, | ||
elParent: this.elPointsMain | ||
elParent: this.elPointsMain, | ||
}) | ||
@@ -687,3 +687,3 @@ } | ||
i: realIndex, | ||
j: j + 1 | ||
j: j + 1, | ||
}) | ||
@@ -711,3 +711,3 @@ if (drawnLabels !== null) { | ||
seriesIndex, | ||
isRangeStart | ||
isRangeStart, | ||
}) { | ||
@@ -832,3 +832,3 @@ let w = this.w | ||
linePath, | ||
areaPath | ||
areaPath, | ||
} | ||
@@ -835,0 +835,0 @@ } |
@@ -74,3 +74,3 @@ import Animations from '../modules/Animations' | ||
this.ret = graphics.group({ | ||
class: 'apexcharts-pie' | ||
class: 'apexcharts-pie', | ||
}) | ||
@@ -160,3 +160,3 @@ | ||
? w.config.plotOptions.pie.donut.background | ||
: 'transparent' | ||
: 'transparent', | ||
}) | ||
@@ -175,3 +175,3 @@ | ||
elSeries.attr({ | ||
transform: `translate(${translateX}, ${translateY}) scale(${scaleSize})` | ||
transform: `translate(${translateX}, ${translateY}) scale(${scaleSize})`, | ||
}) | ||
@@ -190,3 +190,3 @@ | ||
translateX, | ||
translateY | ||
translateY, | ||
}) | ||
@@ -212,3 +212,3 @@ | ||
let g = graphics.group({ | ||
class: 'apexcharts-slices' | ||
class: 'apexcharts-slices', | ||
}) | ||
@@ -228,3 +228,3 @@ | ||
rel: i + 1, | ||
'data:realIndex': i | ||
'data:realIndex': i, | ||
}) | ||
@@ -248,3 +248,3 @@ | ||
size: this.sliceSizes[i], | ||
value: series[i] | ||
value: series[i], | ||
}) // additionally, pass size for gradient drawing in the fillPath function | ||
@@ -262,3 +262,3 @@ | ||
fillOpacity: w.config.fill.opacity, | ||
classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i}` | ||
classes: `apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${i}`, | ||
}) | ||
@@ -268,3 +268,3 @@ | ||
index: 0, | ||
j: i | ||
j: i, | ||
}) | ||
@@ -285,3 +285,3 @@ | ||
'data:strokeWidth': this.strokeWidth, | ||
'data:value': series[i] | ||
'data:value': series[i], | ||
}) | ||
@@ -291,3 +291,3 @@ | ||
x: 0, | ||
y: 0 | ||
y: 0, | ||
} | ||
@@ -338,3 +338,3 @@ | ||
shouldSetPrevPaths: true, | ||
dur: w.config.chart.animations.dynamicAnimation.speed | ||
dur: w.config.chart.animations.dynamicAnimation.speed, | ||
}) | ||
@@ -349,3 +349,3 @@ } else { | ||
animBeginArr: this.animBeginArr, | ||
dur | ||
dur, | ||
}) | ||
@@ -383,3 +383,3 @@ } | ||
seriesIndex: i, | ||
w | ||
w, | ||
}) | ||
@@ -390,3 +390,3 @@ } | ||
const elPieLabelWrap = graphics.group({ | ||
class: `apexcharts-datalabels` | ||
class: `apexcharts-datalabels`, | ||
}) | ||
@@ -401,3 +401,3 @@ let elPieLabel = graphics.drawText({ | ||
fontWeight: w.config.dataLabels.style.fontWeight, | ||
foreColor | ||
foreColor, | ||
}) | ||
@@ -531,3 +531,3 @@ | ||
: opts.prevEndAngle - opts.prevStartAngle, | ||
size | ||
size, | ||
}) | ||
@@ -540,3 +540,3 @@ el.attr({ d: path }) | ||
el.animate(opts.dur, w.globals.easing, opts.animBeginArr[opts.i]) | ||
.afterAll(function() { | ||
.afterAll(function () { | ||
if ( | ||
@@ -549,3 +549,3 @@ me.chartType === 'pie' || | ||
{ | ||
'stroke-width': me.strokeWidth | ||
'stroke-width': me.strokeWidth, | ||
} | ||
@@ -573,3 +573,3 @@ ) | ||
angle: currAngle, | ||
size | ||
size, | ||
}) | ||
@@ -580,3 +580,3 @@ | ||
el.attr({ | ||
d: path | ||
d: path, | ||
}) | ||
@@ -589,3 +589,3 @@ }) | ||
angle, | ||
size | ||
size, | ||
}) | ||
@@ -600,3 +600,3 @@ | ||
d: path, | ||
'stroke-width': me.strokeWidth | ||
'stroke-width': me.strokeWidth, | ||
}) | ||
@@ -619,3 +619,3 @@ } | ||
elPath.attr({ | ||
'data:pieClicked': 'false' | ||
'data:pieClicked': 'false', | ||
}) | ||
@@ -626,3 +626,3 @@ this.revertDataLabelsInner(elPath.node, this.donutDataLabels) | ||
elPath.attr({ | ||
d: origPath | ||
d: origPath, | ||
}) | ||
@@ -652,3 +652,3 @@ return | ||
angle, | ||
size | ||
size, | ||
}) | ||
@@ -668,3 +668,3 @@ | ||
angle: prevEndAngle - prevStartAngle, | ||
size: this.size | ||
size: this.size, | ||
}) | ||
@@ -736,3 +736,3 @@ } | ||
y1, | ||
'z' | ||
'z', | ||
].join(' ') | ||
@@ -783,3 +783,3 @@ } else if (me.chartType === 'pie' || me.chartType === 'polarArea') { | ||
'stroke-width': w.config.plotOptions.polarArea.rings.strokeWidth, | ||
stroke: w.config.plotOptions.polarArea.rings.strokeColor | ||
stroke: w.config.plotOptions.polarArea.rings.strokeColor, | ||
}) | ||
@@ -819,3 +819,3 @@ | ||
opts.translateY ? opts.translateY : 0 | ||
}) scale(${w.config.plotOptions.pie.customScale})` | ||
}) scale(${w.config.plotOptions.pie.customScale})`, | ||
}) | ||
@@ -882,3 +882,3 @@ | ||
fontWeight: labelFontWeight, | ||
fontFamily: labelFontFamily | ||
fontFamily: labelFontFamily, | ||
}) | ||
@@ -902,3 +902,3 @@ elLabel.node.classList.add('apexcharts-datalabel-label') | ||
fontSize: dataLabelsConfig.value.fontSize, | ||
fontFamily: dataLabelsConfig.value.fontFamily | ||
fontFamily: dataLabelsConfig.value.fontFamily, | ||
}) | ||
@@ -1030,5 +1030,4 @@ elValue.node.classList.add('apexcharts-datalabel-value') | ||
let sliceOut = false | ||
const slices = w.globals.dom.baseEl.getElementsByClassName( | ||
`apexcharts-pie-area` | ||
) | ||
const slices = | ||
w.globals.dom.baseEl.getElementsByClassName(`apexcharts-pie-area`) | ||
@@ -1035,0 +1034,0 @@ const selectSlice = ({ makeSliceOut, printLabel }) => { |
@@ -79,4 +79,3 @@ import Bar from './Bar' | ||
let elGoalsMarkers = graphics.group({ | ||
class: 'apexcharts-rangebar-goals-markers', | ||
style: `pointer-events: none`, | ||
class: 'apexcharts-rangebar-goals-markers' | ||
}) | ||
@@ -83,0 +82,0 @@ |
@@ -33,3 +33,3 @@ import '../libs/Treemap-squared' | ||
let ret = graphics.group({ | ||
class: 'apexcharts-treemap' | ||
class: 'apexcharts-treemap', | ||
}) | ||
@@ -67,3 +67,3 @@ | ||
rel: i + 1, | ||
'data:realIndex': i | ||
'data:realIndex': i, | ||
}) | ||
@@ -78,3 +78,3 @@ | ||
let elDataLabelWrap = graphics.group({ | ||
class: 'apexcharts-data-labels' | ||
class: 'apexcharts-data-labels', | ||
}) | ||
@@ -107,3 +107,3 @@ | ||
width: x2 - x1, | ||
height: y2 - y1 | ||
height: y2 - y1, | ||
}) | ||
@@ -128,3 +128,3 @@ | ||
seriesNumber: i, | ||
dataPointIndex: j | ||
dataPointIndex: j, | ||
}) | ||
@@ -135,3 +135,3 @@ | ||
elRect.attr({ | ||
fill: pathFill | ||
fill: pathFill, | ||
}) | ||
@@ -145,3 +145,3 @@ | ||
width: 0, | ||
height: 0 | ||
height: 0, | ||
} | ||
@@ -152,3 +152,3 @@ let toRect = { | ||
width: x2 - x1, | ||
height: y2 - y1 | ||
height: y2 - y1, | ||
} | ||
@@ -180,3 +180,3 @@ | ||
const fontSize = this.getFontSize(r) | ||
let fontSize = this.getFontSize(r) | ||
@@ -187,4 +187,15 @@ let formattedText = w.config.dataLabels.formatter(this.labels[i][j], { | ||
dataPointIndex: j, | ||
w | ||
w, | ||
}) | ||
if (w.config.plotOptions.treemap.dataLabels.format === 'truncate') { | ||
fontSize = parseInt(w.config.dataLabels.style.fontSize, 10) | ||
formattedText = this.truncateLabels( | ||
formattedText, | ||
fontSize, | ||
x1, | ||
y1, | ||
x2, | ||
y2 | ||
) | ||
} | ||
let dataLabels = this.helpers.calculateDataLabels({ | ||
@@ -198,3 +209,3 @@ text: formattedText, | ||
fontSize, | ||
series | ||
series, | ||
}) | ||
@@ -298,3 +309,5 @@ if (w.config.dataLabels.enabled && dataLabels) { | ||
'transform', | ||
`rotate(-90 ${labelRotatingCenter.x} ${labelRotatingCenter.y})` | ||
`rotate(-90 ${labelRotatingCenter.x} ${ | ||
labelRotatingCenter.y | ||
}) translate(${textRect.height / 3})` | ||
) | ||
@@ -304,2 +317,28 @@ } | ||
// This is an alternative label formatting method that uses a | ||
// consistent font size, and trims the edge of long labels | ||
truncateLabels(text, fontSize, x1, y1, x2, y2) { | ||
const graphics = new Graphics(this.ctx) | ||
const textRect = graphics.getTextRects(text, fontSize) | ||
// Determine max width based on ideal orientation of text | ||
const labelMaxWidth = | ||
textRect.width + this.w.config.stroke.width + 5 > x2 - x1 && | ||
y2 - y1 > x2 - x1 | ||
? y2 - y1 | ||
: x2 - x1 | ||
const truncatedText = graphics.getTextBasedOnMaxWidth({ | ||
text: text, | ||
maxWidth: labelMaxWidth, | ||
fontSize: fontSize, | ||
}) | ||
// Return empty label when text has been trimmed for very small rects | ||
if (text.length !== truncatedText.length && labelMaxWidth / fontSize < 5) { | ||
return '' | ||
} else { | ||
return truncatedText | ||
} | ||
} | ||
animateTreemap(el, fromRect, toRect, speed) { | ||
@@ -313,3 +352,3 @@ const animations = new Animations(this.ctx) | ||
width: fromRect.width, | ||
height: fromRect.height | ||
height: fromRect.height, | ||
}, | ||
@@ -320,3 +359,3 @@ { | ||
width: toRect.width, | ||
height: toRect.height | ||
height: toRect.height, | ||
}, | ||
@@ -323,0 +362,0 @@ speed, |
@@ -1,2 +0,1 @@ | ||
import CoreUtils from '../CoreUtils' | ||
import Graphics from '../Graphics' | ||
@@ -21,3 +20,3 @@ import XAxis from './XAxis' | ||
this.isRangeBar = w.globals.seriesRange.length | ||
this.isRangeBar = w.globals.seriesRange.length && w.globals.isBarHorizontal | ||
@@ -453,3 +452,3 @@ if (w.globals.timescaleLabels.length > 0) { | ||
if (this.isRangeBar && w.globals.isBarHorizontal) { | ||
if (this.isRangeBar) { | ||
xCount-- | ||
@@ -456,0 +455,0 @@ yTickAmount = w.globals.labels.length |
@@ -612,3 +612,3 @@ import Bar from '../charts/Bar' | ||
if (typeof w.config.chart.events.selection !== 'function') { | ||
let targets = w.config.chart.brush.targets || [ | ||
let targets = Array.isArray(w.config.chart.brush.targets) || [ | ||
w.config.chart.brush.target, | ||
@@ -615,0 +615,0 @@ ] |
@@ -626,3 +626,5 @@ import CoreUtils from './CoreUtils' | ||
// turn on the isXNumeric flag to allow minX and maxX to function properly | ||
gl.isXNumeric = true | ||
if (!this.w.globals.isBarHorizontal) { | ||
gl.isXNumeric = true | ||
} | ||
} | ||
@@ -629,0 +631,0 @@ |
@@ -131,3 +131,3 @@ import Data from '../modules/Data' | ||
ignoreClear: true, | ||
ignoreDimensions: true | ||
ignoreDimensions: true, | ||
}) | ||
@@ -191,3 +191,3 @@ // render the svg to canvas | ||
columnDelimiter = ',', | ||
lineDelimiter = '\n' | ||
lineDelimiter = '\n', | ||
}) { | ||
@@ -239,3 +239,3 @@ const w = this.w | ||
dataPointIndex: i, | ||
w | ||
w, | ||
}) | ||
@@ -308,3 +308,3 @@ } else { | ||
if (dataFormat.isFormatXY()) { | ||
columns.push(series[ci].data[i].y) | ||
columns.push(series[ci].data[i]?.y) | ||
} else { | ||
@@ -370,3 +370,3 @@ columns.push(gSeries[ci][i]) | ||
series.map((s, sI) => { | ||
const sname = s.name ? s.name : `series-${sI}` | ||
const sname = (s.name ? s.name : `series-${sI}`) + '' | ||
if (w.globals.axisCharts) { | ||
@@ -373,0 +373,0 @@ columns.push( |
@@ -173,3 +173,4 @@ import Defaults from '../settings/Defaults' | ||
type: s.type ? s.type : ser && ser.type, | ||
data: s.data ? s.data : ser && ser.data | ||
group: s.group ? s.group : ser && ser.group, | ||
data: s.data ? s.data : ser && ser.data, | ||
} | ||
@@ -176,0 +177,0 @@ } |
@@ -192,3 +192,3 @@ import CoreUtils from '../CoreUtils' | ||
rel: i + 1, | ||
'data:collapsed': collapsedSeries || ancillaryCollapsedSeries | ||
'data:collapsed': collapsedSeries || ancillaryCollapsedSeries, | ||
}) | ||
@@ -208,2 +208,4 @@ | ||
? w.globals.colors[i] | ||
: Array.isArray(w.config.legend.labels.colors) | ||
? w.config.legend.labels.colors?.[i] | ||
: w.config.legend.labels.colors | ||
@@ -225,3 +227,3 @@ | ||
'data:default-text': encodeURIComponent(text), | ||
'data:collapsed': collapsedSeries || ancillaryCollapsedSeries | ||
'data:collapsed': collapsedSeries || ancillaryCollapsedSeries, | ||
}) | ||
@@ -277,3 +279,3 @@ | ||
seriesName: Utils.escapeString(legendNames[i]), | ||
'data:collapsed': collapsedSeries || ancillaryCollapsedSeries | ||
'data:collapsed': collapsedSeries || ancillaryCollapsedSeries, | ||
}) | ||
@@ -461,3 +463,3 @@ | ||
seriesCnt, | ||
this.w | ||
this.w, | ||
]) | ||
@@ -464,0 +466,0 @@ } |
@@ -63,3 +63,8 @@ import Utils from '../utils/Utils' | ||
if (gl.labels.length) { | ||
if ( | ||
gl.labels.length && | ||
cnf.xaxis.type !== 'datetime' && | ||
gl.series.reduce((a, c) => a + c.length, 0) !== 0 | ||
) { | ||
// the condition cnf.xaxis.type !== 'datetime' fixes #3897 and #3905 | ||
gl.dataPoints = Math.max(gl.dataPoints, gl.labels.length) | ||
@@ -66,0 +71,0 @@ } |
@@ -99,3 +99,3 @@ import Utils from '../utils/Utils' | ||
while (1) { | ||
result.push(val) | ||
result.push(Utils.stripNumber(val, 7)) | ||
val += stepSize | ||
@@ -110,3 +110,3 @@ if (val > ub) { | ||
niceMin: result[0], | ||
niceMax: result[result.length - 1] | ||
niceMax: result[result.length - 1], | ||
} | ||
@@ -116,3 +116,3 @@ } else { | ||
let v = yMin | ||
result.push(v) | ||
result.push(Utils.stripNumber(v, 7)) | ||
let valuesDivider = Math.abs(yMax - yMin) / ticks | ||
@@ -131,3 +131,3 @@ for (let i = 0; i <= ticks; i++) { | ||
niceMin: result[0], | ||
niceMax: result[result.length - 1] | ||
niceMax: result[result.length - 1], | ||
} | ||
@@ -164,3 +164,3 @@ } | ||
niceMin: result[0], | ||
niceMax: result[result.length - 1] | ||
niceMax: result[result.length - 1], | ||
} | ||
@@ -186,3 +186,3 @@ } | ||
niceMin: logs[0], | ||
niceMax: logs[logs.length - 1] | ||
niceMax: logs[logs.length - 1], | ||
} | ||
@@ -229,3 +229,3 @@ } | ||
niceMin: yMin, | ||
niceMax: yMax | ||
niceMax: yMax, | ||
} | ||
@@ -348,7 +348,7 @@ } | ||
similarIndex: i, | ||
alreadyExists: true | ||
alreadyExists: true, | ||
}) | ||
} else { | ||
scalesIndices.push({ | ||
index: si | ||
index: si, | ||
}) | ||
@@ -429,7 +429,7 @@ } | ||
key: yi, | ||
value: minYValue | ||
value: minYValue, | ||
}) | ||
sameScaleMaxYArr[i].push({ | ||
key: yi, | ||
value: maxYArr[yi] | ||
value: maxYArr[yi], | ||
}) | ||
@@ -436,0 +436,0 @@ } |
@@ -345,2 +345,3 @@ /** | ||
target: undefined, | ||
targets: undefined, | ||
}, | ||
@@ -485,2 +486,5 @@ stacked: false, | ||
useFillColorAsStroke: false, | ||
dataLabels: { | ||
format: 'scale', // scale | truncate | ||
}, | ||
colorScale: { | ||
@@ -487,0 +491,0 @@ inverse: false, |
@@ -7,3 +7,3 @@ /* | ||
static bind(fn, me) { | ||
return function() { | ||
return function () { | ||
return fn.apply(me, arguments) | ||
@@ -37,4 +37,4 @@ } | ||
if (typeof Object.assign !== 'function') { | ||
;(function() { | ||
Object.assign = function(target) { | ||
;(function () { | ||
Object.assign = function (target) { | ||
'use strict' | ||
@@ -68,3 +68,3 @@ // We must check against these specific cases. | ||
Object.assign(output, { | ||
[key]: source[key] | ||
[key]: source[key], | ||
}) | ||
@@ -76,3 +76,3 @@ } else { | ||
Object.assign(output, { | ||
[key]: source[key] | ||
[key]: source[key], | ||
}) | ||
@@ -141,2 +141,6 @@ } | ||
static stripNumber(num, precision = 2) { | ||
return parseFloat(num.toPrecision(precision)) | ||
} | ||
static randomId() { | ||
@@ -190,3 +194,3 @@ return (Math.random() + 1).toString(36).substring(4) | ||
x: rect.left, | ||
y: rect.top | ||
y: rect.top, | ||
} | ||
@@ -307,3 +311,3 @@ } | ||
x: centerX + radius * Math.cos(angleInRadians), | ||
y: centerY + radius * Math.sin(angleInRadians) | ||
y: centerY + radius * Math.sin(angleInRadians), | ||
} | ||
@@ -310,0 +314,0 @@ } |
@@ -153,2 +153,3 @@ // Typescript declarations for Apex class and module. | ||
target?: string | ||
targets?: string[] | ||
} | ||
@@ -525,2 +526,4 @@ id?: string | ||
dumbbellColors?: string[][]; | ||
isFunnel?: boolean; | ||
isFunnel3d?: boolean; | ||
colors?: { | ||
@@ -601,2 +604,3 @@ ranges?: { | ||
useFillColorAsStroke?: boolean | ||
dataLabels?: { format?: 'scale' | 'truncate' } | ||
colorScale?: { | ||
@@ -603,0 +607,0 @@ inverse?: boolean |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4366348
70370