Socket
Socket
Sign inDemoInstall

apexcharts

Package Overview
Dependencies
Maintainers
2
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apexcharts - npm Package Compare versions

Comparing version 3.40.0 to 3.41.0

dist/locales/da.json

2

package.json
{
"name": "apexcharts",
"version": "3.40.0",
"version": "3.41.0",
"description": "A JavaScript Chart Library",

@@ -5,0 +5,0 @@ "repository": {

@@ -28,2 +28,8 @@ import BarDataLabels from './common/bar/DataLabels'

this.isVerticalGroupedRangeBar =
!w.globals.isBarHorizontal &&
w.globals.seriesRange.length &&
w.config.plotOptions.bar.rangeBarGroupRows
this.isFunnel = this.barOptions.isFunnel
this.xyRatios = xyRatios

@@ -42,2 +48,3 @@

this.seriesLen = 0
this.pathArr = []

@@ -47,3 +54,3 @@ const ser = new Series(this.ctx)

'bar',
'column'
'column',
])

@@ -84,3 +91,3 @@

let ret = graphics.group({
class: 'apexcharts-bar-series apexcharts-plot-series'
class: 'apexcharts-bar-series apexcharts-plot-series',
})

@@ -114,3 +121,3 @@

seriesName: Utils.escapeString(w.globals.seriesNames[realIndex]),
'data:realIndex': realIndex
'data:realIndex': realIndex,
})

@@ -154,10 +161,25 @@

class: 'apexcharts-datalabels',
'data:realIndex': realIndex
'data:realIndex': realIndex,
})
w.globals.delayedElements.push({
el: elDataLabelsWrap.node,
})
elDataLabelsWrap.node.classList.add('apexcharts-element-hidden')
let elGoalsMarkers = graphics.group({
class: 'apexcharts-bar-goals-markers',
style: `pointer-events: none`
style: `pointer-events: none`,
})
let elBarShadows = graphics.group({
class: 'apexcharts-bar-shadows',
style: `pointer-events: none`,
})
w.globals.delayedElements.push({
el: elBarShadows.node,
})
elBarShadows.node.classList.add('apexcharts-element-hidden')
for (let j = 0; j < w.globals.dataPoints; j++) {

@@ -172,3 +194,3 @@ const strokeWidth = this.barHelpers.getStrokeWidth(i, j, realIndex)

realIndex,
bc
bc,
},

@@ -178,3 +200,3 @@ x,

strokeWidth,
elSeries
elSeries,
}

@@ -186,3 +208,3 @@ if (this.isHorizontal) {

zeroW,
yDivision
yDivision,
})

@@ -195,3 +217,3 @@ barWidth = this.series[i][j] / this.invertedYRatio

barWidth,
zeroH
zeroH,
})

@@ -201,2 +223,25 @@ barHeight = this.series[i][j] / this.yRatio[this.yaxisIndex]

let pathFill = this.barHelpers.getPathFillColor(series, i, j, realIndex)
if (
this.isFunnel &&
this.barOptions.isFunnel3d &&
this.pathArr.length &&
j > 0
) {
const barShadow = this.barHelpers.drawBarShadow({
color:
typeof pathFill === 'string' && pathFill?.indexOf('url') === -1
? pathFill
: Utils.hexToRgba(w.globals.colors[i]),
prevPaths: this.pathArr[this.pathArr.length - 1],
currPaths: paths,
})
if (barShadow) {
elBarShadows.add(barShadow)
}
}
this.pathArr.push(paths)
const barGoalLine = this.barHelpers.drawGoalLine({

@@ -208,3 +253,3 @@ barXPosition: paths.barXPosition,

barHeight,
barWidth
barWidth,
})

@@ -226,4 +271,2 @@

let pathFill = this.barHelpers.getPathFillColor(series, i, j, realIndex)
this.renderSeries({

@@ -245,4 +288,5 @@ realIndex,

elGoalsMarkers,
elBarShadows,
visibleSeries: this.visibleI,
type: 'bar'
type: 'bar',
})

@@ -267,3 +311,3 @@ }

i,
groupIndex,
groupIndex, // required in grouped-stacked bars
pathFrom,

@@ -273,14 +317,16 @@ pathTo,

elSeries,
x,
y,
y1,
y2,
x, // x pos
y, // y pos
y1, // absolute value
y2, // absolute value
series,
barHeight,
barWidth,
barXPosition,
barYPosition,
elDataLabelsWrap,
elGoalsMarkers,
elBarShadows,
visibleSeries,
type
type,
}) {

@@ -323,3 +369,3 @@ const w = this.w

dataChangeSpeed: w.config.chart.animations.dynamicAnimation.speed,
className: `apexcharts-${type}-area`
className: `apexcharts-${type}-area`,
})

@@ -360,5 +406,6 @@

barWidth,
barXPosition,
barYPosition,
renderedPath,
visibleSeries
visibleSeries,
})

@@ -378,2 +425,6 @@ if (dataLabelsObj.dataLabels !== null) {

}
if (elBarShadows) {
elSeries.add(elBarShadows)
}
return elSeries

@@ -390,3 +441,3 @@ }

yDivision,
elSeries
elSeries,
}) {

@@ -428,2 +479,8 @@ let w = this.w

if (this.isFunnel) {
zeroW =
zeroW -
(this.barHelpers.getXForValue(this.series[i][j], zeroW) - zeroW) / 2
}
x = this.barHelpers.getXForValue(this.series[i][j], zeroW)

@@ -441,3 +498,3 @@

j,
w
w,
})

@@ -454,3 +511,3 @@

y2: barHeight * this.seriesLen,
elSeries
elSeries,
})

@@ -461,2 +518,3 @@

pathFrom: paths.pathFrom,
x1: zeroW,
x,

@@ -466,3 +524,3 @@ y,

barYPosition,
barHeight
barHeight,
}

@@ -479,3 +537,3 @@ }

strokeWidth,
elSeries
elSeries,
}) {

@@ -539,3 +597,3 @@ let w = this.w

j,
w
w,
})

@@ -553,3 +611,3 @@

x2: barWidth * this.seriesLen + strokeWidth / 2,
elSeries
elSeries,
})

@@ -564,3 +622,3 @@

barXPosition,
barWidth
barWidth,
}

@@ -567,0 +625,0 @@ }

@@ -34,3 +34,3 @@ import CoreUtils from '../modules/CoreUtils'

let ret = this.graphics.group({
class: 'apexcharts-bar-series apexcharts-plot-series'
class: 'apexcharts-bar-series apexcharts-plot-series',
})

@@ -78,3 +78,3 @@

rel: i + 1,
'data:realIndex': realIndex
'data:realIndex': realIndex,
})

@@ -86,3 +86,3 @@ this.ctx.series.addCollapsedClassToSeries(elSeries, realIndex)

class: 'apexcharts-datalabels',
'data:realIndex': realIndex
'data:realIndex': realIndex,
})

@@ -92,3 +92,3 @@

class: 'apexcharts-bar-goals-markers',
style: `pointer-events: none`
style: `pointer-events: none`,
})

@@ -137,3 +137,3 @@

groupIndex,
seriesGroup: w.globals.seriesGroups[groupIndex]
seriesGroup: w.globals.seriesGroups[groupIndex],
}

@@ -146,3 +146,3 @@ let paths = null

barHeight,
yDivision
yDivision,
})

@@ -155,3 +155,3 @@ barWidth = this.series[i][j] / this.invertedYRatio

barWidth,
zeroH
zeroH,
})

@@ -167,3 +167,3 @@ barHeight = this.series[i][j] / this.yRatio[this.yaxisIndex]

barHeight,
barWidth
barWidth,
})

@@ -201,3 +201,3 @@

type: 'bar',
visibleSeries: 0
visibleSeries: 0,
})

@@ -236,5 +236,2 @@ }

if (w.globals.seriesGroups?.length) {
barHeight = barHeight / w.globals.seriesGroups.length
}
if (String(w.config.plotOptions.bar.barHeight).indexOf('%') === -1) {

@@ -265,5 +262,3 @@ barHeight = parseInt(w.config.plotOptions.bar.barHeight, 10)

}
if (w.globals.seriesGroups?.length) {
barWidth = barWidth / w.globals.seriesGroups.length
}
if (String(w.config.plotOptions.bar.columnWidth).indexOf('%') === -1) {

@@ -286,6 +281,10 @@ barWidth = parseInt(w.config.plotOptions.bar.columnWidth, 10)

xDivision,
barHeight,
barWidth,
barHeight: w.globals.seriesGroups?.length
? barHeight / w.globals.seriesGroups.length
: barHeight,
barWidth: w.globals.seriesGroups?.length
? barWidth / w.globals.seriesGroups.length
: barWidth,
zeroH,
zeroW
zeroW,
}

@@ -304,3 +303,3 @@ }

yDivision,
elSeries
elSeries,
}) {

@@ -368,3 +367,3 @@ let w = this.w

j,
w
w,
})

@@ -377,3 +376,3 @@

y2: barHeight,
elSeries
elSeries,
})

@@ -389,3 +388,3 @@

x,
y
y,
}

@@ -403,3 +402,3 @@ }

seriesGroup,
elSeries
elSeries,
}) {

@@ -526,3 +525,3 @@ let w = this.w

j,
w
w,
})

@@ -536,3 +535,3 @@

x2: barWidth,
elSeries
elSeries,
})

@@ -548,3 +547,3 @@

x: w.globals.isXNumeric ? x - xDivision : x,
y
y,
}

@@ -551,0 +550,0 @@ }

@@ -9,3 +9,4 @@ import Graphics from '../../../modules/Graphics'

this.totalFormatter = this.w.config.plotOptions.bar.dataLabels.total.formatter
this.totalFormatter =
this.w.config.plotOptions.bar.dataLabels.total.formatter

@@ -37,5 +38,6 @@ if (!this.totalFormatter) {

barWidth,
barXPosition,
barYPosition,
visibleSeries,
renderedPath
renderedPath,
} = opts

@@ -71,2 +73,10 @@ let w = this.w

if (
typeof barXPosition !== 'undefined' &&
this.barCtx.isVerticalGroupedRangeBar
) {
bcx = barXPosition
dataLabelsX = barXPosition
}
const offX = dataLabelsConfig.offsetX

@@ -77,3 +87,3 @@ const offY = dataLabelsConfig.offsetY

width: 0,
height: 0
height: 0,
}

@@ -109,3 +119,3 @@ if (w.config.dataLabels.enabled) {

offX,
offY
offY,
}

@@ -125,3 +135,3 @@

barHeight,
barWidth
barWidth,
})

@@ -138,3 +148,3 @@

textRects,
dataLabelsConfig
dataLabelsConfig,
})

@@ -150,3 +160,3 @@

dataLabelsConfig,
barTotalDataLabelsConfig
barTotalDataLabelsConfig,
})

@@ -157,3 +167,3 @@ }

dataLabels,
totalDataLabels
totalDataLabels,
}

@@ -171,3 +181,3 @@ }

dataPointIndex: j,
w
w,
})

@@ -191,2 +201,3 @@ }

textRects,
dataLabelsX,
dataLabelsY,

@@ -198,6 +209,5 @@ dataLabelsConfig,

offX,
offY
offY,
} = opts
let dataLabelsX
let totalDataLabelsY

@@ -215,6 +225,11 @@ let totalDataLabelsX

let dataPointsDividedWidth = w.globals.gridWidth / w.globals.dataPoints
if (w.globals.isXNumeric) {
dataLabelsX = bcx - barWidth / 2 + offX
if (this.barCtx.isVerticalGroupedRangeBar) {
dataLabelsX = dataLabelsX + barWidth / 2
} else {
dataLabelsX = bcx - dataPointsDividedWidth + barWidth / 2 + offX
if (w.globals.isXNumeric) {
dataLabelsX = bcx - barWidth / 2 + offX
} else {
dataLabelsX = bcx - dataPointsDividedWidth + barWidth / 2 + offX
}
}

@@ -332,3 +347,3 @@

totalDataLabelsY,
totalDataLabelsAnchor
totalDataLabelsAnchor,
}

@@ -355,3 +370,3 @@ }

offX,
offY
offY,
} = opts

@@ -469,3 +484,3 @@

totalDataLabelsY,
totalDataLabelsAnchor
totalDataLabelsAnchor,
}

@@ -483,3 +498,3 @@ }

barWidth,
dataLabelsConfig
dataLabelsConfig,
}) {

@@ -503,3 +518,3 @@ const w = this.w

class: 'apexcharts-data-labels',
transform: rotate
transform: rotate,
})

@@ -513,3 +528,3 @@

dataPointIndex: j,
w
w,
})

@@ -570,3 +585,3 @@ }

let modifiedDataLabelsConfig = {
...dataLabelsConfig
...dataLabelsConfig,
}

@@ -592,3 +607,3 @@ if (this.barCtx.isHorizontal) {

alwaysDrawDataLabel: true,
offsetCorrection: true
offsetCorrection: true,
})

@@ -606,3 +621,3 @@ }

textAnchor,
barTotalDataLabelsConfig
barTotalDataLabelsConfig,
}) {

@@ -627,3 +642,3 @@ const graphics = new Graphics(this.barCtx.ctx)

fontSize: barTotalDataLabelsConfig.style.fontSize,
fontWeight: barTotalDataLabelsConfig.style.fontWeight
fontWeight: barTotalDataLabelsConfig.style.fontWeight,
})

@@ -630,0 +645,0 @@ }

import Fill from '../../../modules/Fill'
import Graphics from '../../../modules/Graphics'
import Series from '../../../modules/Series'
import Utils from '../../../utils/Utils'

@@ -88,2 +89,5 @@ export default class Helpers {

if (this.barCtx.isFunnel) {
zeroW = w.globals.gridWidth / 2
}
y = (yDivision - barHeight * this.barCtx.seriesLen) / 2

@@ -97,3 +101,3 @@ } else {

barWidth =
((xDivision / this.barCtx.seriesLen) *
((xDivision / seriesLen) *
parseInt(this.barCtx.barOptions.columnWidth, 10)) /

@@ -117,3 +121,3 @@ 100

barWidth =
((xDivision / this.barCtx.seriesLen) *
((xDivision / seriesLen) *
parseInt(this.barCtx.barOptions.columnWidth, 10)) /

@@ -151,3 +155,3 @@ 100

zeroH,
zeroW
zeroW,
}

@@ -233,3 +237,3 @@ }

? w.config.series[i].data[j]?.fill.type
: w.config.fill.type
: w.config.fill.type,
})

@@ -319,3 +323,3 @@

j,
w
w,
}) {

@@ -395,3 +399,3 @@ const graphics = new Graphics(this.barCtx.ctx)

pathTo,
pathFrom
pathFrom,
}

@@ -410,3 +414,3 @@ }

j,
w
w,
}) {

@@ -484,3 +488,3 @@ const graphics = new Graphics(this.barCtx.ctx)

pathTo,
pathFrom
pathFrom,
}

@@ -542,3 +546,3 @@ }

: this.getYForValue(value, zeroH, false),
attrs
attrs,
})

@@ -564,3 +568,3 @@ }

strokeLineCap: 'round',
strokeColor: Array.isArray(colors[i]) ? colors[i][0] : colors[i]
strokeColor: Array.isArray(colors[i]) ? colors[i][0] : colors[i],
}

@@ -571,3 +575,3 @@

...commonAttrs,
strokeColor: Array.isArray(colors[i]) ? colors[i][1] : colors[i]
strokeColor: Array.isArray(colors[i]) ? colors[i][1] : colors[i],
})

@@ -584,7 +588,7 @@ }

barWidth,
barHeight
barHeight,
}) {
let graphics = new Graphics(this.barCtx.ctx)
const lineGroup = graphics.group({
className: 'apexcharts-bar-goals-groups'
className: 'apexcharts-bar-goals-groups',
})

@@ -594,3 +598,3 @@

this.barCtx.w.globals.delayedElements.push({
el: lineGroup.node
el: lineGroup.node,
})

@@ -652,2 +656,32 @@

}
drawBarShadow({ prevPaths, currPaths, color }) {
const w = this.w
const { x: prevX2, x1: prevX1, barYPosition: prevY1 } = prevPaths
const { x: currX2, x1: currX1, barYPosition: currY1 } = currPaths
const prevY2 = prevY1 + currPaths.barHeight
const graphics = new Graphics(this.barCtx.ctx)
const utils = new Utils()
const shadowPath =
graphics.move(prevX1, prevY2) +
graphics.line(prevX2, prevY2) +
graphics.line(currX2, currY1) +
graphics.line(currX1, currY1) +
graphics.line(prevX1, prevY2) +
(w.config.plotOptions.bar.borderRadiusApplication === 'around'
? ' Z'
: ' z')
return graphics.drawPath({
d: shadowPath,
fill: utils.shadeColor(0.5, Utils.rgb2hex(color)),
stroke: 'none',
strokeWidth: 0,
fillOpacity: 1,
classes: 'apexcharts-bar-shadows',
})
}
}

@@ -26,3 +26,3 @@ import Bar from './Bar'

let ret = graphics.group({
class: 'apexcharts-rangebar-series apexcharts-plot-series'
class: 'apexcharts-rangebar-series apexcharts-plot-series',
})

@@ -45,3 +45,3 @@

rel: i + 1,
'data:realIndex': realIndex
'data:realIndex': realIndex,
})

@@ -69,3 +69,5 @@

barWidth = initPositions.barWidth
barHeight = initPositions.barHeight
xDivision = initPositions.xDivision
yDivision = initPositions.yDivision
zeroH = initPositions.zeroH

@@ -76,3 +78,3 @@

class: 'apexcharts-datalabels',
'data:realIndex': realIndex
'data:realIndex': realIndex,
})

@@ -82,3 +84,3 @@

class: 'apexcharts-rangebar-goals-markers',
style: `pointer-events: none`
style: `pointer-events: none`,
})

@@ -93,24 +95,22 @@

let paths = null
let barXPosition = null
let barYPosition = null
const params = { x, y, strokeWidth, elSeries }
yDivision = initPositions.yDivision
barHeight = initPositions.barHeight
let seriesLen = this.seriesLen
if (w.config.plotOptions.bar.rangeBarGroupRows) {
seriesLen = 1
}
if (typeof w.config.series[i].data[j] === 'undefined') {
// no data exists for further indexes, hence we need to get out the innr loop.
// As we are iterating over total datapoints, there is a possiblity the series might not have data for j index
break
}
if (this.isHorizontal) {
barYPosition = y + barHeight * this.visibleI
let seriesLen = this.seriesLen
if (w.config.plotOptions.bar.rangeBarGroupRows) {
seriesLen = 1
}
let srty = (yDivision - barHeight * seriesLen) / 2
if (typeof w.config.series[i].data[j] === 'undefined') {
// no data exists for further indexes, hence we need to get out the innr loop.
// As we are iterating over total datapoints, there is a possiblity the series might not have data for j index
break
}
if (w.config.series[i].data[j].x) {

@@ -124,3 +124,3 @@ let positions = this.detectOverlappingBars({

yDivision,
initPositions
initPositions,
})

@@ -140,3 +140,3 @@

y2,
...params
...params,
})

@@ -146,8 +146,34 @@

} else {
if (w.globals.isXNumeric) {
x =
(w.globals.seriesX[i][j] - w.globals.minX) / this.xRatio -
barWidth / 2
}
barXPosition = x + barWidth * this.visibleI
let srtx = (xDivision - barWidth * seriesLen) / 2
if (w.config.series[i].data[j].x) {
let positions = this.detectOverlappingBars({
i,
j,
barXPosition,
srtx,
barWidth,
xDivision,
initPositions,
})
barWidth = positions.barWidth
barXPosition = positions.barXPosition
}
paths = this.drawRangeColumnPaths({
indexes: { i, j, realIndex },
barWidth,
barXPosition,
zeroH,
barWidth,
xDivision,
...params
...params,
})

@@ -164,3 +190,3 @@

barHeight,
barWidth
barWidth,
})

@@ -195,2 +221,4 @@

barHeight,
barWidth,
barXPosition,
barYPosition,

@@ -201,3 +229,3 @@ barWidth,

visibleSeries: this.visibleI,
type: 'rangebar'
type: 'rangebar',
})

@@ -216,6 +244,10 @@ }

barYPosition,
barXPosition,
srty,
srtx,
barHeight,
barWidth,
yDivision,
initPositions
xDivision,
initPositions,
}) {

@@ -226,4 +258,8 @@ const w = this.w

const labelX = w.config.series[i].data[j].x
const rowIndex = w.globals.labels.indexOf(labelX)
const x = w.config.series[i].data[j].x
const labelX = Array.isArray(x) ? x.join(' ') : x
const rowIndex = w.globals.labels
.map((_) => (Array.isArray(_) ? _.join(' ') : _))
.indexOf(labelX)
const overlappedIndex = w.globals.seriesRange[i].findIndex(

@@ -233,21 +269,47 @@ (tx) => tx.x === labelX && tx.overlaps.length > 0

if (w.config.plotOptions.bar.rangeBarGroupRows) {
barYPosition = srty + yDivision * rowIndex
if (this.isHorizontal) {
if (w.config.plotOptions.bar.rangeBarGroupRows) {
barYPosition = srty + yDivision * rowIndex
} else {
barYPosition = srty + barHeight * this.visibleI + yDivision * rowIndex
}
if (overlappedIndex > -1 && !w.config.plotOptions.bar.rangeBarOverlap) {
overlaps = w.globals.seriesRange[i][overlappedIndex].overlaps
if (overlaps.indexOf(rangeName) > -1) {
barHeight = initPositions.barHeight / overlaps.length
barYPosition =
barHeight * this.visibleI +
(yDivision * (100 - parseInt(this.barOptions.barHeight, 10))) /
100 /
2 +
barHeight * (this.visibleI + overlaps.indexOf(rangeName)) +
yDivision * rowIndex
}
}
} else {
barYPosition = srty + barHeight * this.visibleI + yDivision * rowIndex
}
if (rowIndex > -1) {
if (w.config.plotOptions.bar.rangeBarGroupRows) {
barXPosition = srtx + xDivision * rowIndex
} else {
barXPosition = srtx + barWidth * this.visibleI + xDivision * rowIndex
}
}
if (overlappedIndex > -1 && !w.config.plotOptions.bar.rangeBarOverlap) {
overlaps = w.globals.seriesRange[i][overlappedIndex].overlaps
if (overlappedIndex > -1 && !w.config.plotOptions.bar.rangeBarOverlap) {
overlaps = w.globals.seriesRange[i][overlappedIndex].overlaps
if (overlaps.indexOf(rangeName) > -1) {
barHeight = initPositions.barHeight / overlaps.length
if (overlaps.indexOf(rangeName) > -1) {
barWidth = initPositions.barWidth / overlaps.length
barYPosition =
barHeight * this.visibleI +
(yDivision * (100 - parseInt(this.barOptions.barHeight, 10))) /
100 /
2 +
barHeight * (this.visibleI + overlaps.indexOf(rangeName)) +
yDivision * rowIndex
barXPosition =
barWidth * this.visibleI +
(xDivision * (100 - parseInt(this.barOptions.barWidth, 10))) /
100 /
2 +
barWidth * (this.visibleI + overlaps.indexOf(rangeName)) +
xDivision * rowIndex
}
}

@@ -258,3 +320,5 @@ }

barYPosition,
barHeight
barXPosition,
barHeight,
barWidth,
}

@@ -266,6 +330,6 @@ }

x,
strokeWidth,
xDivision,
barWidth,
zeroH
barXPosition,
zeroH,
}) {

@@ -285,9 +349,2 @@ let w = this.w

if (w.globals.isXNumeric) {
x =
(w.globals.seriesX[i][j] - w.globals.minX) / this.xRatio - barWidth / 2
}
let barXPosition = x + barWidth * this.visibleI
if (

@@ -314,3 +371,3 @@ typeof this.series[i][j] === 'undefined' ||

j,
w
w,
})

@@ -329,3 +386,3 @@

goalY: this.barHelpers.getGoalValues('y', null, zeroH, i, j),
barXPosition
barXPosition,
}

@@ -342,3 +399,3 @@ }

barYPosition,
zeroW
zeroW,
}) {

@@ -362,3 +419,3 @@ let w = this.w

j: indexes.j,
w
w,
})

@@ -382,3 +439,3 @@

),
y
y,
}

@@ -391,3 +448,3 @@ }

start: w.globals.seriesRangeStart[i][j],
end: w.globals.seriesRangeEnd[i][j]
end: w.globals.seriesRangeEnd[i][j],
}

@@ -394,0 +451,0 @@ }

@@ -86,5 +86,3 @@ import Utils from '../utils/Utils'

animateLine(el, from, to, speed) {
el.attr(from)
.animate(speed)
.attr(to)
el.attr(from).animate(speed).attr(to)
}

@@ -101,3 +99,3 @@

width: from,
height: from
height: from,
})

@@ -108,3 +106,3 @@ .animate(speed, easing)

width: to.width,
height: to.height
height: to.height,
})

@@ -123,3 +121,3 @@ .afterAll(() => {

cx: from.cx,
cy: from.cy
cy: from.cy,
})

@@ -130,3 +128,3 @@ .animate(speed, easing)

cx: to.cx,
cy: to.cy
cy: to.cy,
})

@@ -183,2 +181,3 @@ }

ele.classList.remove('apexcharts-element-hidden')
ele.classList.add('apexcharts-hidden-element-shown')
})

@@ -185,0 +184,0 @@ }

@@ -37,3 +37,3 @@ import CoreUtils from '../CoreUtils'

elGrid = graphics.group({
class: 'apexcharts-grid'
class: 'apexcharts-grid',
})

@@ -284,3 +284,3 @@ }

xCount,
parent: this.elgridLinesV
parent: this.elgridLinesV,
})

@@ -304,3 +304,3 @@ }

xCount,
parent: this.elgridLinesV
parent: this.elgridLinesV,
})

@@ -350,3 +350,3 @@

y2,
parent: this.elgridLinesH
parent: this.elgridLinesH,
})

@@ -379,3 +379,3 @@

y2,
parent: this.elgridLinesV
parent: this.elgridLinesV,
})

@@ -406,3 +406,3 @@ }

y2,
parent: this.elgridLinesH
parent: this.elgridLinesH,
})

@@ -422,12 +422,12 @@

this.elg = graphics.group({
class: 'apexcharts-grid'
class: 'apexcharts-grid',
})
this.elgridLinesH = graphics.group({
class: 'apexcharts-gridlines-horizontal'
class: 'apexcharts-gridlines-horizontal',
})
this.elgridLinesV = graphics.group({
class: 'apexcharts-gridlines-vertical'
class: 'apexcharts-gridlines-vertical',
})
this.elGridBorders = graphics.group({
class: 'apexcharts-grid-borders'
class: 'apexcharts-grid-borders',
})

@@ -459,3 +459,3 @@

if (this.isRangeBar) {
if (this.isRangeBar && w.globals.isBarHorizontal) {
xCount--

@@ -480,3 +480,3 @@ yTickAmount = w.globals.labels.length

elGridBorders: this.elGridBorders,
xAxisTickWidth: w.globals.gridWidth / xCount
xAxisTickWidth: w.globals.gridWidth / xCount,
}

@@ -508,3 +508,3 @@ }

y2,
type: 'row'
type: 'row',
})

@@ -541,3 +541,3 @@

y2,
type: 'column'
type: 'column',
})

@@ -544,0 +544,0 @@

@@ -67,3 +67,3 @@ import Graphics from '../Graphics'

class: 'apexcharts-xaxis',
transform: `translate(${w.config.xaxis.offsetX}, ${w.config.xaxis.offsetY})`
transform: `translate(${w.config.xaxis.offsetX}, ${w.config.xaxis.offsetY})`,
})

@@ -73,3 +73,3 @@

class: 'apexcharts-xaxis-texts-g',
transform: `translate(${w.globals.translateXAxisX}, ${w.globals.translateXAxisY})`
transform: `translate(${w.globals.translateXAxisX}, ${w.globals.translateXAxisY})`,
})

@@ -124,3 +124,3 @@

let elXaxisTitle = graphics.group({
class: 'apexcharts-xaxis-title'
class: 'apexcharts-xaxis-title',
})

@@ -144,3 +144,3 @@

cssClass:
'apexcharts-xaxis-title-text ' + w.config.xaxis.title.style.cssClass
'apexcharts-xaxis-title-text ' + w.config.xaxis.title.style.cssClass,
})

@@ -308,3 +308,3 @@

? 'apexcharts-xaxis-label '
: 'apexcharts-xaxis-group-label ') + cssClass
: 'apexcharts-xaxis-group-label ') + cssClass,
})

@@ -316,3 +316,3 @@ elXaxisTexts.add(elText)

const opts = Object.assign({}, w, {
labelIndex: i
labelIndex: i,
})

@@ -356,3 +356,3 @@

class: 'apexcharts-yaxis apexcharts-xaxis-inversed',
rel: realIndex
rel: realIndex,
})

@@ -362,3 +362,3 @@

class: 'apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g',
transform: 'translate(' + translateYAxisX + ', 0)'
transform: 'translate(' + translateYAxisX + ', 0)',
})

@@ -394,3 +394,3 @@

dataPointIndex: i,
w
w,
})

@@ -437,3 +437,3 @@

cssClass: 'apexcharts-yaxis-label ' + ylabels.style.cssClass,
maxWidth: ylabels.maxWidth
maxWidth: ylabels.maxWidth,
})

@@ -446,3 +446,3 @@

const opts = Object.assign({}, w, {
labelIndex: i
labelIndex: i,
})

@@ -474,3 +474,3 @@

class: 'apexcharts-yaxis-title apexcharts-xaxis-title-inversed',
transform: 'translate(' + translateYAxisX + ', 0)'
transform: 'translate(' + translateYAxisX + ', 0)',
})

@@ -489,3 +489,3 @@

'apexcharts-yaxis-title-text ' +
w.config.yaxis[0].title.style.cssClass
w.config.yaxis[0].title.style.cssClass,
})

@@ -655,5 +655,4 @@

// truncate rotated y axis in bar chart (x axis)
let firstLabelPosX = yAxisTextsInversed[
yAxisTextsInversed.length - 1
].getBBox()
let firstLabelPosX =
yAxisTextsInversed[yAxisTextsInversed.length - 1].getBBox()
let lastLabelPosX = yAxisTextsInversed[0].getBBox()

@@ -660,0 +659,0 @@

@@ -55,3 +55,3 @@ import Bar from '../charts/Bar'

'heatmap',
'treemap'
'treemap',
]

@@ -68,3 +68,3 @@

'scatter',
'bubble'
'bubble',
]

@@ -89,3 +89,3 @@

id: gl.chartClass.substring(1),
class: 'apexcharts-canvas ' + gl.chartClass.substring(1)
class: 'apexcharts-canvas ' + gl.chartClass.substring(1),
})

@@ -98,3 +98,3 @@ this.el.appendChild(gl.dom.elWrap)

'xmlns:data': 'ApexChartsNS',
transform: `translate(${cnf.chart.offsetX}, ${cnf.chart.offsetY})`
transform: `translate(${cnf.chart.offsetX}, ${cnf.chart.offsetY})`,
})

@@ -114,3 +114,3 @@

width: gl.svgWidth,
height: gl.svgHeight
height: gl.svgHeight,
})

@@ -125,3 +125,3 @@ gl.dom.elLegendWrap = document.createElement('div')

gl.dom.elGraphical = gl.dom.Paper.group().attr({
class: 'apexcharts-inner apexcharts-graphical'
class: 'apexcharts-inner apexcharts-graphical',
})

@@ -142,11 +142,11 @@

series: [],
i: []
i: [],
}
let areaSeries = {
series: [],
i: []
i: [],
}
let scatterSeries = {
series: [],
i: []
i: [],
}

@@ -156,3 +156,3 @@

series: [],
i: []
i: [],
}

@@ -162,3 +162,3 @@

series: [],
i: []
i: [],
}

@@ -168,3 +168,3 @@

series: [],
i: []
i: [],
}

@@ -174,3 +174,3 @@

series: [],
i: []
i: [],
}

@@ -180,3 +180,3 @@

series: [],
i: []
i: [],
}

@@ -187,3 +187,3 @@

seriesRangeEnd: [],
i: []
i: [],
}

@@ -342,3 +342,3 @@

let boxPlot = new BoxCandleStick(this.ctx, xyRatios)
elGraph = boxPlot.draw(gl.series, 'boxPlot')
elGraph = boxPlot.draw(gl.series, cnf.chart.type)
break

@@ -433,3 +433,3 @@ case 'rangeBar':

width: gl.svgWidth,
height: gl.svgHeight
height: gl.svgHeight,
})

@@ -460,3 +460,3 @@

let scalingAttrs = {
transform: 'translate(' + tX + ', ' + tY + ')'
transform: 'translate(' + tX + ', ' + tY + ')',
}

@@ -518,3 +518,3 @@ Graphics.setAttrs(gl.dom.elGraphical.node, scalingAttrs)

Graphics.setAttrs(gl.dom.Paper.node, {
height: newHeight
height: newHeight,
})

@@ -608,6 +608,6 @@

min: targetChart.w.globals.minX,
max: targetChart.w.globals.maxX
}
}
}
max: targetChart.w.globals.maxX,
},
},
},
},

@@ -631,3 +631,3 @@ false,

let targets = w.config.chart.brush.targets || [
w.config.chart.brush.target
w.config.chart.brush.target,
]

@@ -671,4 +671,4 @@ // retro compatibility with single target option

min: yaxis[0].min,
max: yaxis[0].max
}
max: yaxis[0].max,
},
]

@@ -683,5 +683,5 @@ },

min: e.xaxis.min,
max: e.xaxis.max
max: e.xaxis.max,
},
yaxis: multipleYaxis
yaxis: multipleYaxis,
},

@@ -688,0 +688,0 @@ false,

@@ -267,3 +267,3 @@ import CoreUtils from './CoreUtils'

overlaps: [],
y: []
y: [],
}

@@ -290,3 +290,3 @@ })

y2: isDataPoint2D ? ser[i].data[j].y[1] : ser[i].data[j].y,
rangeName: id
rangeName: id,
}

@@ -309,3 +309,3 @@

end: rangeEnd,
rangeUniques: uniqueKeys
rangeUniques: uniqueKeys,
}

@@ -381,3 +381,3 @@ }

l: serL,
c: serC
c: serC,
}

@@ -574,4 +574,6 @@ }

})
gl.labels = gl.labels.filter(
(elem, pos, arr) => arr.indexOf(elem) === pos
// remove duplicate x-axis labels
gl.labels = Array.from(
new Set(gl.labels.map(JSON.stringify)),
JSON.parse
)

@@ -681,3 +683,3 @@ }

// set Null values to 0 in all series when user hides/shows some series
if (cnf.chart.type === 'bar' && cnf.chart.stacked) {
if (cnf.chart.stacked) {
const series = new Series(this.ctx)

@@ -684,0 +686,0 @@ gl.series = series.setNullSeriesToZeroValues(gl.series)

@@ -75,3 +75,3 @@ import Scatter from './../charts/Scatter'

textRects,
drawnextLabel
drawnextLabel,
}

@@ -100,3 +100,3 @@ }

elDataLabelsWrap = graphics.group({
class: 'apexcharts-data-labels'
class: 'apexcharts-data-labels',
})

@@ -130,3 +130,3 @@

dataPointIndex,
w
w,
})

@@ -161,3 +161,3 @@ }

offsetCorrection: true,
dataLabelsConfig: w.config.dataLabels
dataLabelsConfig: w.config.dataLabels,
})

@@ -185,3 +185,3 @@ }

alwaysDrawDataLabel,
offsetCorrection
offsetCorrection,
} = opts

@@ -199,3 +199,3 @@

drawnextLabel: true,
textRects: null
textRects: null,
}

@@ -246,3 +246,3 @@

dataPointIndex: j,
w
w,
})

@@ -276,3 +276,3 @@ }

fontFamily: dataLabelsConfig.style.fontFamily,
fontWeight: dataLabelsConfig.style.fontWeight || 'normal'
fontWeight: dataLabelsConfig.style.fontWeight || 'normal',
})

@@ -283,3 +283,3 @@

cx: x,
cy: y
cy: y,
})

@@ -286,0 +286,0 @@

@@ -49,3 +49,3 @@ import Graphics from '../Graphics'

dataPointIndex: -1,
w
w,
})

@@ -107,3 +107,3 @@ let valArr = val

? arrLabelrect.height
: rect.height
: rect.height,
})

@@ -113,3 +113,3 @@ } else {

width,
height
height,
})

@@ -145,3 +145,3 @@ }

width: rect.width,
height: rect.height
height: rect.height,
})

@@ -151,3 +151,3 @@ } else {

width: 0,
height: 0
height: 0,
})

@@ -168,3 +168,3 @@ }

const isHiddenYAxis = function(index) {
const isHiddenYAxis = function (index) {
return w.globals.ignoreYAxisIndexes.indexOf(index) > -1

@@ -171,0 +171,0 @@ }

@@ -59,3 +59,3 @@ import Graphics from './Graphics'

width: imgWidth + 'px',
height: imgHeight + 'px'
height: imgHeight + 'px',
})

@@ -73,3 +73,3 @@

width: imgWidth + 'px',
height: imgHeight + 'px'
height: imgHeight + 'px',
})

@@ -84,8 +84,9 @@

const w = this.w
const cType = w.config.chart.type
if (
((w.config.chart.type === 'bar' || w.config.chart.type === 'rangeBar') &&
((cType === 'bar' || cType === 'rangeBar') &&
w.config.plotOptions.bar.distributed) ||
w.config.chart.type === 'heatmap' ||
w.config.chart.type === 'treemap'
cType === 'heatmap' ||
cType === 'treemap'
) {

@@ -124,3 +125,3 @@ this.seriesIndex = opts.seriesNumber

value: opts.value,
w
w,
})

@@ -159,3 +160,3 @@ }

fillOpacity,
defaultColor
defaultColor,
})

@@ -169,3 +170,3 @@ }

fillOpacity,
i: this.seriesIndex
i: this.seriesIndex,
})

@@ -188,7 +189,9 @@ }

patternUnits: opts.patternUnits,
patternID: `pattern${w.globals.cuid}${opts.seriesNumber +
1}${patternID}`
patternID: `pattern${w.globals.cuid}${
opts.seriesNumber + 1
}${patternID}`,
})
pathFill = `url(#pattern${w.globals.cuid}${opts.seriesNumber +
1}${patternID})`
pathFill = `url(#pattern${w.globals.cuid}${
opts.seriesNumber + 1
}${patternID})`
} else if (fillType === 'gradient') {

@@ -275,3 +278,3 @@ pathFill = gradientFill

fillOpacity,
defaultColor
defaultColor,
}) {

@@ -325,3 +328,3 @@ let fillCnf = this.w.config.fill

...fillCnf,
...fillConfig
...fillConfig,
}

@@ -328,0 +331,0 @@ }

@@ -62,2 +62,6 @@ import Utils from '../utils/Utils'

}
if (gl.labels.length) {
gl.dataPoints = Math.max(gl.dataPoints, gl.labels.length)
}
for (let j = 0; j < gl.series[i].length; j++) {

@@ -164,3 +168,3 @@ let val = series[i][j]

lowestY,
highestY
highestY,
}

@@ -303,3 +307,3 @@ }

maxYArr: gl.maxYArr,
yAxisScale: gl.yAxisScale
yAxisScale: gl.yAxisScale,
}

@@ -396,3 +400,3 @@ }

niceMin: catScale[0],
niceMax: catScale[catScale.length - 1]
niceMax: catScale[catScale.length - 1],
}

@@ -433,3 +437,3 @@ } else {

minX: gl.minX,
maxX: gl.maxX
maxX: gl.maxX,
}

@@ -436,0 +440,0 @@ }

@@ -45,3 +45,3 @@ import Defaults from './Defaults'

'radar',
'radialBar'
'radialBar',
]

@@ -55,2 +55,6 @@

if (opts.plotOptions?.bar?.isFunnel) {
chartDefaults = defaults.funnel()
}
if (opts.chart.stacked && opts.chart.type === 'bar') {

@@ -57,0 +61,0 @@ chartDefaults = defaults.stackedBars()

@@ -18,3 +18,3 @@ import Utils from '../../utils/Utils'

y2,
w
w,
}) => {

@@ -35,3 +35,3 @@ let start = w.globals.seriesRangeStart[seriesIndex][dataPointIndex]

start,
end
end,
}

@@ -52,3 +52,3 @@

dateFormatter: new DateTime(ctx).formatDate,
w
w,
})

@@ -93,11 +93,4 @@ }

const buildRangeTooltipHTML = (opts) => {
let {
color,
seriesName,
ylabel,
start,
end,
seriesIndex,
dataPointIndex
} = opts
let { color, seriesName, ylabel, start, end, seriesIndex, dataPointIndex } =
opts

@@ -152,2 +145,10 @@ const formatter = opts.ctx.tooltip.tooltipLabels.getFormatters(seriesIndex)

hideYAxis() {
this.opts.yaxis[0].show = false
this.opts.yaxis[0].title.text = ''
this.opts.yaxis[0].axisBorder.show = false
this.opts.yaxis[0].axisTicks.show = false
this.opts.yaxis[0].floating = true
}
line() {

@@ -157,11 +158,11 @@ return {

animations: {
easing: 'swing'
}
easing: 'swing',
},
},
dataLabels: {
enabled: false
enabled: false,
},
stroke: {
width: 5,
curve: 'straight'
curve: 'straight',
},

@@ -171,10 +172,10 @@ markers: {

hover: {
sizeOffset: 6
}
sizeOffset: 6,
},
},
xaxis: {
crosshairs: {
width: 1
}
}
width: 1,
},
},
}

@@ -184,8 +185,3 @@ }

sparkline(defaults) {
this.opts.yaxis[0].show = false
this.opts.yaxis[0].title.text = ''
this.opts.yaxis[0].axisBorder.show = false
this.opts.yaxis[0].axisTicks.show = false
this.opts.yaxis[0].floating = true
this.hideYAxis()
const ret = {

@@ -198,33 +194,33 @@ grid: {

top: 0,
bottom: 0
}
bottom: 0,
},
},
legend: {
show: false
show: false,
},
xaxis: {
labels: {
show: false
show: false,
},
tooltip: {
enabled: false
enabled: false,
},
axisBorder: {
show: false
show: false,
},
axisTicks: {
show: false
}
show: false,
},
},
chart: {
toolbar: {
show: false
show: false,
},
zoom: {
enabled: false
}
enabled: false,
},
},
dataLabels: {
enabled: false
}
enabled: false,
},
}

@@ -240,4 +236,4 @@

animations: {
easing: 'swing'
}
easing: 'swing',
},
},

@@ -247,20 +243,20 @@ plotOptions: {

dataLabels: {
position: 'center'
}
}
position: 'center',
},
},
},
dataLabels: {
style: {
colors: ['#fff']
colors: ['#fff'],
},
background: {
enabled: false
}
enabled: false,
},
},
stroke: {
width: 0,
lineCap: 'round'
lineCap: 'round',
},
fill: {
opacity: 0.85
opacity: 0.85,
},

@@ -271,12 +267,12 @@ legend: {

radius: 2,
size: 8
}
size: 8,
},
},
tooltip: {
shared: false,
intersect: true
intersect: true,
},
xaxis: {
tooltip: {
enabled: false
enabled: false,
},

@@ -288,15 +284,63 @@ tickPlacement: 'between',

fill: {
type: 'gradient'
type: 'gradient',
},
dropShadow: {
enabled: false
enabled: false,
},
stroke: {
width: 0
}
}
}
width: 0,
},
},
},
}
}
funnel() {
this.hideYAxis()
return {
...this.bar(),
chart: {
animations: {
easing: 'linear',
speed: 800,
animateGradually: {
enabled: false,
},
},
},
plotOptions: {
bar: {
horizontal: true,
borderRadiusApplication: 'around',
borderRadius: 0,
dataLabels: {
position: 'center',
},
},
},
grid: {
show: false,
padding: {
left: 0,
right: 0,
},
},
xaxis: {
labels: {
show: false,
},
tooltip: {
enabled: false,
},
axisBorder: {
show: false,
},
axisTicks: {
show: false,
},
},
}
}
candlestick() {

@@ -306,9 +350,9 @@ return {

width: 1,
colors: ['#333']
colors: ['#333'],
},
fill: {
opacity: 1
opacity: 1,
},
dataLabels: {
enabled: false
enabled: false,
},

@@ -325,3 +369,3 @@ tooltip: {

)
}
},
},

@@ -331,11 +375,11 @@ states: {

filter: {
type: 'none'
}
}
type: 'none',
},
},
},
xaxis: {
crosshairs: {
width: 1
}
}
width: 1,
},
},
}

@@ -349,12 +393,12 @@ }

dynamicAnimation: {
enabled: false
}
}
enabled: false,
},
},
},
stroke: {
width: 1,
colors: ['#24292e']
colors: ['#24292e'],
},
dataLabels: {
enabled: false
enabled: false,
},

@@ -371,3 +415,3 @@ tooltip: {

)
}
},
},

@@ -377,9 +421,9 @@ markers: {

strokeWidth: 1,
strokeColors: '#111'
strokeColors: '#111',
},
xaxis: {
crosshairs: {
width: 1
}
}
width: 1,
},
},
}

@@ -392,3 +436,3 @@ }

...opts,
isTimeline: true
isTimeline: true,
})

@@ -401,3 +445,3 @@ return buildRangeTooltipHTML({

start: startVal,
end: endVal
end: endVal,
})

@@ -414,3 +458,3 @@ }

start,
end
end,
})

@@ -421,8 +465,8 @@ }

animations: {
animateGradually: false
}
animateGradually: false,
},
},
stroke: {
width: 0,
lineCap: 'square'
lineCap: 'square',
},

@@ -433,5 +477,5 @@ plotOptions: {

dataLabels: {
position: 'center'
}
}
position: 'center',
},
},
},

@@ -461,10 +505,10 @@ dataLabels: {

background: {
enabled: false
enabled: false,
},
style: {
colors: ['#fff']
}
colors: ['#fff'],
},
},
markers: {
size: 10
size: 10,
},

@@ -484,3 +528,3 @@ tooltip: {

}
}
},
},

@@ -490,10 +534,10 @@ xaxis: {

tooltip: {
enabled: false
enabled: false,
},
crosshairs: {
stroke: {
width: 0
}
}
}
width: 0,
},
},
},
}

@@ -524,5 +568,5 @@ }

opacityTo: 0.5,
stops: [0, 100, 100]
}
}
stops: [0, 100, 100],
},
},
},

@@ -537,4 +581,4 @@ fill: {

opacityTo: 0.5,
stops: [0, 100, 100]
}
stops: [0, 100, 100],
},
},

@@ -544,8 +588,8 @@ markers: {

hover: {
sizeOffset: 6
}
sizeOffset: 6,
},
},
tooltip: {
followCursor: false
}
followCursor: false,
},
}

@@ -563,3 +607,3 @@ }

start,
end
end,
})

@@ -570,10 +614,10 @@ }

curve: 'straight',
width: 0
width: 0,
},
fill: {
type: 'solid',
opacity: 0.6
opacity: 0.6,
},
markers: {
size: 0
size: 0,
},

@@ -583,10 +627,10 @@ states: {

filter: {
type: 'none'
}
type: 'none',
},
},
active: {
filter: {
type: 'none'
}
}
type: 'none',
},
},
},

@@ -599,4 +643,4 @@ tooltip: {

return handleRangeAreaTooltip(opts)
}
}
},
},
}

@@ -610,22 +654,22 @@ }

autoSelected: 'selection',
show: false
show: false,
},
zoom: {
enabled: false
}
enabled: false,
},
},
dataLabels: {
enabled: false
enabled: false,
},
stroke: {
width: 1
width: 1,
},
tooltip: {
enabled: false
enabled: false,
},
xaxis: {
tooltip: {
enabled: false
}
}
enabled: false,
},
},
}

@@ -651,3 +695,3 @@

existingDataLabelFormatter ||
function(val) {
function (val) {
if (typeof val === 'number') {

@@ -671,5 +715,5 @@ return val ? val.toFixed(0) + '%' : val

borderRadiusApplication: 'end',
borderRadiusWhenStacked: 'last'
}
}
borderRadiusWhenStacked: 'last',
},
},
}

@@ -690,3 +734,3 @@ }

opts.xaxis.labels.formatter ||
function(val) {
function (val) {
return Utils.isNumber(val) ? Math.floor(val) : val

@@ -708,3 +752,3 @@ }

if (labels && labels.length) {
opts.xaxis.labels.formatter = function(val) {
opts.xaxis.labels.formatter = function (val) {
return Utils.isNumber(val)

@@ -726,13 +770,13 @@ ? defaultFormatter(labels[Math.floor(val) - 1])

style: {
colors: ['#fff']
}
colors: ['#fff'],
},
},
tooltip: {
shared: false,
intersect: true
intersect: true,
},
xaxis: {
crosshairs: {
width: 0
}
width: 0,
},
},

@@ -746,5 +790,5 @@ fill: {

opacityFrom: 0.4,
opacityTo: 0.8
}
}
opacityTo: 0.8,
},
},
}

@@ -756,7 +800,7 @@ }

dataLabels: {
enabled: false
enabled: false,
},
tooltip: {
shared: false,
intersect: true
intersect: true,
},

@@ -767,5 +811,5 @@ markers: {

hover: {
sizeOffset: 2
}
}
sizeOffset: 2,
},
},
}

@@ -777,14 +821,14 @@ }

chart: {
stacked: false
stacked: false,
},
fill: {
opacity: 1
opacity: 1,
},
dataLabels: {
style: {
colors: ['#fff']
}
colors: ['#fff'],
},
},
stroke: {
colors: ['#fff']
colors: ['#fff'],
},

@@ -794,7 +838,7 @@ tooltip: {

marker: {
show: false
show: false,
},
x: {
show: false
}
show: false,
},
},

@@ -806,10 +850,10 @@ legend: {

size: 10,
offsetY: 2
}
offsetY: 2,
},
},
grid: {
padding: {
right: 20
}
}
right: 20,
},
},
}

@@ -822,4 +866,4 @@ }

zoom: {
enabled: false
}
enabled: false,
},
},

@@ -830,4 +874,4 @@ dataLabels: {

fontWeight: 600,
colors: ['#fff']
}
colors: ['#fff'],
},
},

@@ -837,11 +881,11 @@ stroke: {

width: 2,
colors: ['#fff']
colors: ['#fff'],
},
legend: {
show: false
show: false,
},
fill: {
gradient: {
stops: [0, 100]
}
stops: [0, 100],
},
},

@@ -851,4 +895,4 @@ tooltip: {

x: {
show: false
}
show: false,
},
},

@@ -858,13 +902,13 @@ grid: {

left: 0,
right: 0
}
right: 0,
},
},
xaxis: {
crosshairs: {
show: false
show: false,
},
tooltip: {
enabled: false
}
}
enabled: false,
},
},
}

@@ -877,4 +921,4 @@ }

toolbar: {
show: false
}
show: false,
},
},

@@ -885,6 +929,6 @@ plotOptions: {

labels: {
show: false
}
}
}
show: false,
},
},
},
},

@@ -896,13 +940,13 @@ dataLabels: {

style: {
colors: ['#fff']
colors: ['#fff'],
},
background: {
enabled: false
enabled: false,
},
dropShadow: {
enabled: true
}
enabled: true,
},
},
stroke: {
colors: ['#fff']
colors: ['#fff'],
},

@@ -913,12 +957,12 @@ fill: {

shade: 'light',
stops: [0, 100]
}
stops: [0, 100],
},
},
tooltip: {
theme: 'dark',
fillSeriesColor: true
fillSeriesColor: true,
},
legend: {
position: 'right'
}
position: 'right',
},
}

@@ -931,4 +975,4 @@ }

toolbar: {
show: false
}
show: false,
},
},

@@ -940,13 +984,13 @@ dataLabels: {

style: {
colors: ['#fff']
colors: ['#fff'],
},
background: {
enabled: false
enabled: false,
},
dropShadow: {
enabled: true
}
enabled: true,
},
},
stroke: {
colors: ['#fff']
colors: ['#fff'],
},

@@ -960,12 +1004,12 @@ fill: {

opacityFrom: 1,
opacityTo: 1
}
opacityTo: 1,
},
},
tooltip: {
theme: 'dark',
fillSeriesColor: true
fillSeriesColor: true,
},
legend: {
position: 'right'
}
position: 'right',
},
}

@@ -982,4 +1026,4 @@ }

toolbar: {
show: false
}
show: false,
},
},

@@ -990,18 +1034,18 @@ dataLabels: {

},
enabled: false
enabled: false,
},
stroke: {
show: true,
width: 2
width: 2,
},
fill: {
opacity: 0.7
opacity: 0.7,
},
tooltip: {
theme: 'dark',
fillSeriesColor: true
fillSeriesColor: true,
},
legend: {
position: 'right'
}
position: 'right',
},
}

@@ -1019,7 +1063,7 @@ }

style: {
fontSize: '11px'
}
fontSize: '11px',
},
},
stroke: {
width: 2
width: 2,
},

@@ -1029,6 +1073,6 @@ markers: {

strokeWidth: 1,
strokeOpacity: 1
strokeOpacity: 1,
},
fill: {
opacity: 0.2
opacity: 0.2,
},

@@ -1038,6 +1082,6 @@ tooltip: {

intersect: true,
followCursor: true
followCursor: true,
},
grid: {
show: false
show: false,
},

@@ -1049,12 +1093,12 @@ xaxis: {

colors: ['#a8a8a8'],
fontSize: '11px'
}
fontSize: '11px',
},
},
tooltip: {
enabled: false
enabled: false,
},
crosshairs: {
show: false
}
}
show: false,
},
},
}

@@ -1069,8 +1113,8 @@ }

enabled: true,
speed: 800
}
speed: 800,
},
},
toolbar: {
show: false
}
show: false,
},
},

@@ -1085,13 +1129,13 @@ fill: {

opacityTo: 1,
stops: [70, 98, 100]
}
stops: [70, 98, 100],
},
},
legend: {
show: false,
position: 'right'
position: 'right',
},
tooltip: {
enabled: false,
fillSeriesColor: true
}
fillSeriesColor: true,
},
}

@@ -1098,0 +1142,0 @@ }

@@ -37,5 +37,5 @@ /**

fontFamily: undefined,
cssClass: ''
cssClass: '',
},
formatter: undefined
formatter: undefined,
},

@@ -47,3 +47,3 @@ axisBorder: {

offsetX: 0,
offsetY: 0
offsetY: 0,
},

@@ -55,3 +55,3 @@ axisTicks: {

offsetX: 0,
offsetY: 0
offsetY: 0,
},

@@ -68,8 +68,8 @@ title: {

fontFamily: undefined,
cssClass: ''
}
cssClass: '',
},
},
tooltip: {
enabled: false,
offsetX: 0
offsetX: 0,
},

@@ -82,5 +82,5 @@ crosshairs: {

width: 1,
dashArray: 0
}
}
dashArray: 0,
},
},
}

@@ -106,3 +106,3 @@

radius: 2,
cssClass: ''
cssClass: '',
},

@@ -131,5 +131,5 @@ label: {

top: 2,
bottom: 2
}
}
bottom: 2,
},
},
},

@@ -141,3 +141,3 @@ customSVG: {

offsetX: 0,
offsetY: 0
offsetY: 0,
},

@@ -149,4 +149,4 @@ image: {

offsetX: 0,
offsetY: 0
}
offsetY: 0,
},
}

@@ -190,6 +190,6 @@

top: 2,
bottom: 2
}
}
}
bottom: 2,
},
},
},
}

@@ -232,6 +232,6 @@

top: 2,
bottom: 2
}
}
}
bottom: 2,
},
},
},
}

@@ -256,3 +256,3 @@

paddingTop: 2,
paddingBottom: 2
paddingBottom: 2,
}

@@ -268,3 +268,3 @@ }

images: [],
shapes: []
shapes: [],
},

@@ -278,8 +278,8 @@ chart: {

delay: 150,
enabled: true
enabled: true,
},
dynamicAnimation: {
enabled: true,
speed: 350
}
speed: 350,
},
},

@@ -296,3 +296,3 @@ background: 'transparent',

color: '#000',
opacity: 0.35
opacity: 0.35,
},

@@ -318,3 +318,3 @@ events: {

scrolled: undefined,
brushScrolled: undefined
brushScrolled: undefined,
},

@@ -337,3 +337,3 @@ foreColor: '#373d3f',

color: '#24292e',
opacity: 0.1
opacity: 0.1,
},

@@ -344,15 +344,15 @@ stroke: {

opacity: 0.4,
dashArray: 3
dashArray: 3,
},
xaxis: {
min: undefined,
max: undefined
max: undefined,
},
yaxis: {
min: undefined,
max: undefined
}
max: undefined,
},
},
sparkline: {
enabled: false
enabled: false,
},

@@ -362,3 +362,3 @@ brush: {

autoScaleYaxis: true,
target: undefined
target: undefined,
},

@@ -379,3 +379,3 @@ stacked: false,

reset: true,
customIcons: []
customIcons: [],
},

@@ -390,12 +390,12 @@ export: {

return new Date(timestamp).toDateString()
}
},
},
png: {
filename: undefined
filename: undefined,
},
svg: {
filename: undefined
}
filename: undefined,
},
},
autoSelected: 'zoom' // accepts -> zoom, pan, selection
autoSelected: 'zoom', // accepts -> zoom, pan, selection
},

@@ -411,3 +411,3 @@ type: 'line',

color: '#90CAF9',
opacity: 0.4
opacity: 0.4,
},

@@ -417,10 +417,10 @@ stroke: {

opacity: 0.4,
width: 1
}
}
}
width: 1,
},
},
},
},
plotOptions: {
area: {
fillTo: 'origin'
fillTo: 'origin',
},

@@ -440,2 +440,4 @@ bar: {

dumbbellColors: undefined,
isFunnel: false,
isFunnel3d: true,
colors: {

@@ -445,3 +447,3 @@ ranges: [],

backgroundBarOpacity: 1,
backgroundBarRadius: 0
backgroundBarRadius: 0,
},

@@ -462,6 +464,6 @@ dataLabels: {

fontFamily: undefined,
fontWeight: 600
}
}
}
fontWeight: 600,
},
},
},
},

@@ -471,3 +473,3 @@ bubble: {

minBubbleRadius: undefined,
maxBubbleRadius: undefined
maxBubbleRadius: undefined,
},

@@ -477,7 +479,7 @@ candlestick: {

upward: '#00B746',
downward: '#EF403C'
downward: '#EF403C',
},
wick: {
useFillColor: true
}
useFillColor: true,
},
},

@@ -487,4 +489,4 @@ boxPlot: {

upper: '#00E396',
lower: '#008FFB'
}
lower: '#008FFB',
},
},

@@ -502,4 +504,4 @@ heatmap: {

min: undefined,
max: undefined
}
max: undefined,
},
},

@@ -516,4 +518,4 @@ treemap: {

min: undefined,
max: undefined
}
max: undefined,
},
},

@@ -543,4 +545,4 @@ radialBar: {

color: '#000',
opacity: 0.5
}
opacity: 0.5,
},
},

@@ -561,4 +563,4 @@ track: {

color: '#000',
opacity: 0.5
}
opacity: 0.5,
},
},

@@ -576,3 +578,3 @@ dataLabels: {

return val
}
},
},

@@ -588,3 +590,3 @@ value: {

return val + '%'
}
},
},

@@ -604,5 +606,5 @@ total: {

)
}
}
}
},
},
},
},

@@ -619,3 +621,3 @@ pie: {

offset: 0, // offset by which labels will move outside
minAngleToShowLabel: 10
minAngleToShowLabel: 10,
},

@@ -637,3 +639,3 @@ donut: {

return val
}
},
},

@@ -649,3 +651,3 @@ value: {

return val
}
},
},

@@ -662,6 +664,6 @@ total: {

return w.globals.seriesTotals.reduce((a, b) => a + b, 0)
}
}
}
}
},
},
},
},
},

@@ -671,8 +673,8 @@ polarArea: {

strokeWidth: 1,
strokeColor: '#e8e8e8'
strokeColor: '#e8e8e8',
},
spokes: {
strokeWidth: 1,
connectorColors: '#e8e8e8'
}
connectorColors: '#e8e8e8',
},
},

@@ -689,6 +691,6 @@ radar: {

fill: {
colors: undefined
}
}
}
colors: undefined,
},
},
},
},

@@ -710,3 +712,3 @@ colors: undefined,

fontWeight: 600,
colors: undefined
colors: undefined,
},

@@ -727,4 +729,4 @@ background: {

color: '#000',
opacity: 0.45
}
opacity: 0.45,
},
},

@@ -737,4 +739,4 @@ dropShadow: {

color: '#000',
opacity: 0.45
}
opacity: 0.45,
},
},

@@ -754,3 +756,3 @@ fill: {

stops: [0, 50, 100],
colorStops: []
colorStops: [],
},

@@ -760,3 +762,3 @@ image: {

width: undefined, // optional
height: undefined // optional
height: undefined, // optional
},

@@ -767,4 +769,4 @@ pattern: {

height: 6,
strokeWidth: 2
}
strokeWidth: 2,
},
},

@@ -775,3 +777,3 @@ forecastDataPoints: {

strokeWidth: undefined,
dashArray: 4
dashArray: 4,
},

@@ -785,17 +787,17 @@ grid: {

lines: {
show: false
}
show: false,
},
},
yaxis: {
lines: {
show: true
}
show: true,
},
},
row: {
colors: undefined, // takes as array which will be repeated on rows
opacity: 0.5
opacity: 0.5,
},
column: {
colors: undefined, // takes an array which will be repeated on columns
opacity: 0.5
opacity: 0.5,
},

@@ -806,4 +808,4 @@ padding: {

bottom: 0,
left: 12
}
left: 12,
},
},

@@ -833,3 +835,3 @@ labels: [],

colors: undefined,
useSeriesColors: false
useSeriesColors: false,
},

@@ -846,14 +848,14 @@ markers: {

offsetY: 0,
onClick: undefined
onClick: undefined,
},
itemMargin: {
horizontal: 5,
vertical: 2
vertical: 2,
},
onItemClick: {
toggleDataSeries: true
toggleDataSeries: true,
},
onItemHover: {
highlightDataSeries: true
}
highlightDataSeries: true,
},
},

@@ -881,4 +883,4 @@ markers: {

size: undefined,
sizeOffset: 3
}
sizeOffset: 3,
},
},

@@ -894,4 +896,4 @@ noData: {

fontSize: '14px',
fontFamily: undefined
}
fontFamily: undefined,
},
},

@@ -904,4 +906,4 @@ responsive: [], // breakpoints should follow ascending order 400, then 700, then 1000

type: 'none',
value: 0
}
value: 0,
},
},

@@ -911,4 +913,4 @@ hover: {

type: 'lighten',
value: 0.1
}
value: 0.1,
},
},

@@ -919,5 +921,5 @@ active: {

type: 'darken',
value: 0.5
}
}
value: 0.5,
},
},
},

@@ -935,4 +937,4 @@ title: {

fontFamily: undefined,
color: undefined
}
color: undefined,
},
},

@@ -950,4 +952,4 @@ subtitle: {

fontFamily: undefined,
color: undefined
}
color: undefined,
},
},

@@ -974,5 +976,5 @@ stroke: {

stops: [0, 50, 100],
colorStops: []
}
}
colorStops: [],
},
},
},

@@ -992,6 +994,6 @@ tooltip: {

fontSize: '12px',
fontFamily: undefined
fontFamily: undefined,
},
onDatasetHover: {
highlightDataSeries: false
highlightDataSeries: false,
},

@@ -1002,3 +1004,3 @@ x: {

format: 'dd MMM', // dd/MM, dd MMM yy, dd MMM yyyy
formatter: undefined // a custom user supplied formatter function
formatter: undefined, // a custom user supplied formatter function
},

@@ -1010,15 +1012,15 @@ y: {

return seriesName ? seriesName + ': ' : ''
}
}
},
},
},
z: {
formatter: undefined,
title: 'Size: '
title: 'Size: ',
},
marker: {
show: true,
fillColors: undefined
fillColors: undefined,
},
items: {
display: 'flex'
display: 'flex',
},

@@ -1029,4 +1031,4 @@ fixed: {

offsetX: 0,
offsetY: 0
}
offsetY: 0,
},
},

@@ -1054,3 +1056,3 @@ xaxis: {

fontFamily: undefined,
cssClass: ''
cssClass: '',
},

@@ -1068,4 +1070,4 @@ offsetX: 0,

minute: 'HH:mm:ss',
second: 'HH:mm:ss'
}
second: 'HH:mm:ss',
},
},

@@ -1079,4 +1081,4 @@ group: {

fontFamily: undefined,
cssClass: ''
}
cssClass: '',
},
},

@@ -1089,3 +1091,3 @@ axisBorder: {

offsetX: 0,
offsetY: 0
offsetY: 0,
},

@@ -1097,3 +1099,3 @@ axisTicks: {

offsetX: 0,
offsetY: 0
offsetY: 0,
},

@@ -1117,4 +1119,4 @@ tickAmount: undefined,

fontFamily: undefined,
cssClass: ''
}
cssClass: '',
},
},

@@ -1129,3 +1131,3 @@ crosshairs: {

width: 1,
dashArray: 3
dashArray: 3,
},

@@ -1140,4 +1142,4 @@ fill: {

opacityFrom: 0.4,
opacityTo: 0.5
}
opacityTo: 0.5,
},
},

@@ -1149,4 +1151,4 @@ dropShadow: {

blur: 1,
opacity: 0.4
}
opacity: 0.4,
},
},

@@ -1159,5 +1161,5 @@ tooltip: {

fontSize: '12px',
fontFamily: undefined
}
}
fontFamily: undefined,
},
},
},

@@ -1173,7 +1175,7 @@ yaxis: this.yAxis,

shadeTo: 'light',
shadeIntensity: 0.65
}
}
shadeIntensity: 0.65,
},
},
}
}
}

@@ -39,3 +39,3 @@ import Utils from '../utils/Utils'

if (w.config.colors === undefined) {
if (w.config.colors === undefined || w.config.colors?.length === 0) {
w.globals.colors = this.predefined()

@@ -64,3 +64,3 @@ } else {

dataPointIndex: i,
w
w,
})

@@ -125,3 +125,4 @@ }

} else {
w.globals.dataLabels.style.colors = w.config.dataLabels.style.colors.slice()
w.globals.dataLabels.style.colors =
w.config.dataLabels.style.colors.slice()
}

@@ -132,6 +133,7 @@ this.pushExtraColors(w.globals.dataLabels.style.colors, 50)

w.globals.radarPolygons.fill.colors = [
w.config.theme.mode === 'dark' ? '#424242' : 'none'
w.config.theme.mode === 'dark' ? '#424242' : 'none',
]
} else {
w.globals.radarPolygons.fill.colors = w.config.plotOptions.radar.polygons.fill.colors.slice()
w.globals.radarPolygons.fill.colors =
w.config.plotOptions.radar.polygons.fill.colors.slice()
}

@@ -138,0 +140,0 @@ this.pushExtraColors(w.globals.radarPolygons.fill.colors, 20)

@@ -14,3 +14,9 @@ import Utils from '../../utils/Utils'

this.w = tooltipContext.w
const w = this.w
this.ttCtx = tooltipContext
this.isVerticalGroupedRangeBar =
!w.globals.isBarHorizontal &&
w.config.chart.type === 'rangeBar' &&
w.config.plotOptions.bar.rangeBarGroupRows
}

@@ -41,3 +47,3 @@

shared: false,
e
e,
})

@@ -71,3 +77,3 @@

x,
y
y,
}

@@ -110,3 +116,3 @@ }

shared: ttCtx.showOnIntersect ? false : w.config.tooltip.shared,
e
e,
})

@@ -138,3 +144,3 @@

x,
y
y,
}

@@ -159,3 +165,3 @@ }

e,
opt
opt,
})

@@ -301,2 +307,24 @@ i = barXY.i

const handleXForColumns = (x) => {
if (w.globals.isXNumeric) {
x = cx - bw / 2
} else {
if (this.isVerticalGroupedRangeBar) {
x = cx + bw / 2
} else {
x = cx - ttCtx.dataPointsDividedWidth + bw / 2
}
}
return x
}
const handleYForBars = () => {
return (
cy -
ttCtx.dataPointsDividedHeight +
bh / 2 -
ttCtx.tooltipRect.ttHeight / 2
)
}
ttCtx.tooltipLabels.drawSeriesTexts({

@@ -309,3 +337,3 @@ ttItems: opt.ttItems,

shared: ttCtx.showOnIntersect ? false : w.config.tooltip.shared,
e
e,
})

@@ -316,13 +344,5 @@

x = clientX - seriesBound.left + 15
y =
cy -
ttCtx.dataPointsDividedHeight +
bh / 2 -
ttCtx.tooltipRect.ttHeight / 2
y = handleYForBars()
} else {
if (w.globals.isXNumeric) {
x = cx - bw / 2
} else {
x = cx - ttCtx.dataPointsDividedWidth + bw / 2
}
x = handleXForColumns(x)
y = e.clientY - seriesBound.top - ttCtx.tooltipRect.ttHeight / 2 - 15

@@ -336,16 +356,5 @@ }

}
y =
cy -
ttCtx.dataPointsDividedHeight +
bh / 2 -
ttCtx.tooltipRect.ttHeight / 2
y = handleYForBars()
} else {
// if columns
if (w.globals.isXNumeric) {
x = cx - bw / 2
} else {
x = cx - ttCtx.dataPointsDividedWidth + bw / 2
}
x = handleXForColumns(x)
y = cy // - ttCtx.tooltipRect.ttHeight / 2 + 10

@@ -362,3 +371,3 @@ }

i,
j
j,
}

@@ -365,0 +374,0 @@ }

@@ -224,3 +224,3 @@ import Labels from './Labels'

tooltipX,
ttItems: this.ttItems
ttItems: this.ttItems,
}

@@ -270,5 +270,4 @@

) {
let seriesAll = w.globals.dom.baseEl.querySelectorAll(
'.apexcharts-series'
)
let seriesAll =
w.globals.dom.baseEl.querySelectorAll('.apexcharts-series')
this.addPathsEventListeners(seriesAll, seriesHoverParams)

@@ -321,3 +320,3 @@ }

ttWidth,
ttHeight
ttHeight,
}

@@ -345,3 +344,3 @@ }

hoverArea: opts.hoverArea,
ttItems: opts.ttItems
ttItems: opts.ttItems,
}

@@ -417,3 +416,3 @@

hoverArea: opt.hoverArea,
ttItems: ch.w.globals.tooltip.ttItems
ttItems: ch.w.globals.tooltip.ttItems,
}

@@ -430,3 +429,3 @@

opt: newOpts,
e
e,
})

@@ -440,3 +439,3 @@ }

opt,
e
e,
})

@@ -457,3 +456,3 @@ }

ttWidth: tooltipEl.getBoundingClientRect().width,
ttHeight: tooltipEl.getBoundingClientRect().height
ttHeight: tooltipEl.getBoundingClientRect().height,
}

@@ -482,3 +481,3 @@ ttCtx.e = e

opt,
tooltipRect: ttCtx.tooltipRect
tooltipRect: ttCtx.tooltipRect,
})

@@ -490,3 +489,3 @@ } else {

opt,
tooltipRect: ttCtx.tooltipRect
tooltipRect: ttCtx.tooltipRect,
})

@@ -579,3 +578,3 @@ }

y,
type: w.config.chart.type
type: w.config.chart.type,
})

@@ -591,3 +590,3 @@ x = markerXY.x

e,
opt
opt,
})

@@ -602,3 +601,3 @@ }

x,
y
y,
})

@@ -636,3 +635,3 @@ }

i: parseInt(rel, 10) - 1,
shared: false
shared: false,
})

@@ -650,5 +649,4 @@

const i = rel - 1
const legendName = this.legendLabels[i].getAttribute(
'data:default-text'
)
const legendName =
this.legendLabels[i].getAttribute('data:default-text')

@@ -658,3 +656,3 @@ let text = legendFormatter(legendName, {

dataPointIndex: i,
w
w,
})

@@ -682,3 +680,3 @@

clientX,
clientY
clientY,
})

@@ -797,3 +795,3 @@

dataPointIndex,
w
w,
})

@@ -804,3 +802,3 @@ }

this.ctx,
{ seriesIndex, dataPointIndex, w }
{ seriesIndex, dataPointIndex, w },
])

@@ -845,3 +843,3 @@ }

dataPointIndex: j,
w
w,
})

@@ -869,8 +867,8 @@

'undefined' && {
y1: w.globals.seriesRange?.[capturedSeries]?.[j]?.y[0]?.y1
y1: w.globals.seriesRange?.[capturedSeries]?.[j]?.y[0]?.y1,
}),
...(typeof w.globals.seriesRange?.[capturedSeries]?.[j]?.y[0]?.y2 !==
'undefined' && {
y2: w.globals.seriesRange?.[capturedSeries]?.[j]?.y[0]?.y2
})
y2: w.globals.seriesRange?.[capturedSeries]?.[j]?.y[0]?.y2,
}),
}

@@ -880,3 +878,3 @@ if (shared) {

...commonSeriesTextsParams,
shared: this.showOnIntersect ? false : this.tConfig.shared
shared: this.showOnIntersect ? false : this.tConfig.shared,
})

@@ -912,3 +910,3 @@

shared: false,
...commonSeriesTextsParams
...commonSeriesTextsParams,
})

@@ -915,0 +913,0 @@

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc