zz-chart
Advanced tools
Comparing version 0.1.0-beta.41 to 0.1.0-beta.42
@@ -11,3 +11,2 @@ import { StyleSheet, css } from 'aphrodite/no-important.js'; | ||
overlay: { | ||
position: 'absolute', | ||
visibility: 'hidden', | ||
@@ -165,2 +164,3 @@ pointerEvents: 'none', | ||
this.ctrl.on(ChartEvent.U_PLOT_SET_CURSOR, ({ anchor, title, values }) => { | ||
console.log(anchor); | ||
// @ts-ignore | ||
@@ -167,0 +167,0 @@ placement(this.container, anchor, 'right', 'center', { |
@@ -1,2 +0,2 @@ | ||
import { merge, mergeWith, omit } from 'lodash'; | ||
import { isNumber, merge, mergeWith, omit } from 'lodash'; | ||
import UPlot from 'uplot'; | ||
@@ -113,3 +113,3 @@ import { ChartEvent } from '../types/index.js'; | ||
const series = this.getSeries(); | ||
if (ySeries.length < data.length) { | ||
if (ySeries.length < data.length && data.some(d => isNumber(d[1]))) { | ||
ySeries.forEach((s, index) => { | ||
@@ -258,2 +258,6 @@ if (series.every(d => d.label !== s.label)) { | ||
bound = over; | ||
const cursorX = u.over.querySelector('.u-cursor-x'); | ||
if (cursorX) { | ||
cursorX.style.visibility = 'hidden'; | ||
} | ||
over.addEventListener('click', () => { | ||
@@ -260,0 +264,0 @@ const { left } = u.cursor; |
{ | ||
"name": "zz-chart", | ||
"version": "0.1.0-beta.41", | ||
"version": "0.1.0-beta.42", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "author": "Alauda", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
549138
14328