Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apexcharts

Package Overview
Dependencies
Maintainers
1
Versions
223
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 1.3.17 to 1.3.18

tests/unit/data/sample-data.js

3

jest.config.js

@@ -144,3 +144,4 @@ // For a detailed explanation regarding each configuration property, visit:

"/node_modules/",
"/tests/unit/data/"
"/tests/unit/data/",
"/tests/unit/utils/"
],

@@ -147,0 +148,0 @@

{
"name": "apexcharts",
"description": "A JavaScript Chart Library",
"version": "1.3.17",
"version": "1.3.18",
"main": "dist/apexcharts.min.js",

@@ -6,0 +6,0 @@ "directories": {

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

if (!isFinite(label)) label = ''
if (label.indexOf('NaN') >= 0 || label.indexOf('undefined') >= 0) label = ''

@@ -406,2 +406,13 @@ let offsetYCorrection = 28

if (xAxisTexts.length > 0) {
let firstLabelPos = xAxisTexts[0].getBBox()
let lastLabelPos = xAxisTexts[xAxisTexts.length - 1].getBBox()
if (firstLabelPos.x < -25) {
xAxisTexts[0].remove()
}
if (lastLabelPos.x + lastLabelPos.width > w.globals.gridWidth + 15) {
xAxisTexts[xAxisTexts.length - 1].remove()
}
}
if (yAxisTextsInversed.length > 0) {

@@ -408,0 +419,0 @@ // truncate y axis in bar chart

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

let ts = new TimeScale(this.ctx)
ts.calculateTimeScaleTicks()
const formattedTimeScale = ts.calculateTimeScaleTicks(w.globals.minX, w.globals.maxX)
ts.recalcDimensionsBasedOnFormat(formattedTimeScale)
}

@@ -768,0 +769,0 @@ }

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

calculateTimeScaleTicks () {
calculateTimeScaleTicks (minX, maxX) {
let w = this.w

@@ -31,6 +31,6 @@

const daysDiff = (w.globals.maxX - w.globals.minX) / (1000 * 60 * 60 * 24)
const daysDiff = (maxX - minX) / (1000 * 60 * 60 * 24)
this.determineInterval(daysDiff)
const timeIntervals = dt.getTimeUnitsfromTimestamp(w.globals.minX, w.globals.maxX)
const timeIntervals = dt.getTimeUnitsfromTimestamp(minX, maxX)

@@ -192,2 +192,7 @@ const daysWidthOnXAxis = w.globals.gridWidth / daysDiff

return filteredTimeScale
}
recalcDimensionsBasedOnFormat (filteredTimeScale) {
const w = this.w
const reformattedTimescaleArray = this.formatDates(filteredTimeScale)

@@ -204,4 +209,2 @@

dimensions.plotCoords()
return filteredTimeScale
}

@@ -208,0 +211,0 @@

@@ -1,23 +0,13 @@

import ApexCharts from '../../dist/apexcharts.min.js'
import Core from '../../src/modules/Core.js'
import seriesxy from './data/seriesxy.js'
import { createChart } from './utils/utils.js'
describe("Parse Data", () => {
function createChart(type, series) {
document.body.innerHTML = '<div id="chart" />';
const chart = new ApexCharts(document.querySelector("#chart"), {
chart: {
type
},
series
})
return chart
}
it("should parse data for cartesian charts", () => {
const chart = createChart('line', seriesxy)
chart.w.globals.series = []
chart.w.globals.seriesX = []
chart.w.globals.labels = []
const core = new Core(document.querySelector("#chart"), chart)

@@ -34,2 +24,5 @@ const w = core.parseDataAxisCharts(seriesxy, seriesxy, chart)

const chart = createChart('donut', series)
chart.w.globals.series = []
chart.w.globals.seriesNames = []

@@ -36,0 +29,0 @@ const core = new Core(document.querySelector("#chart"), chart)

Sorry, the diff of this file is too big to display

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