zz-chart
Advanced tools
Comparing version 0.1.0-beta.22 to 0.1.0-beta.23
@@ -34,8 +34,4 @@ import { StyleSheet, css } from 'aphrodite/no-important.js'; | ||
const y = get(this.option, 'lineY'); | ||
if (x) { | ||
this.lineX(x); | ||
} | ||
if (y) { | ||
this.lineY(y); | ||
} | ||
this.lineX(x); | ||
this.lineY(y); | ||
} | ||
@@ -56,3 +52,6 @@ update() { | ||
stroke: this.ctrl.getTheme().colorVar['n-6'], | ||
}, } = get(this.option, 'lineX'); | ||
}, } = get(this.option, 'lineX', {}); | ||
if (!data) { | ||
return; | ||
} | ||
let ctx = u.ctx; | ||
@@ -87,3 +86,5 @@ ctx.save(); | ||
const labelStyle = getComputedStyle(labelEl); | ||
markEl.style.top = `-${0 + parseInt(labelStyle.height, 10)}px`; | ||
requestAnimationFrame(() => { | ||
markEl.style.top = `-${0 + parseInt(labelStyle.height, 10)}px`; | ||
}); | ||
!markLabelE && markEl.appendChild(labelEl); | ||
@@ -105,3 +106,3 @@ !markE && u.over.appendChild(markEl); | ||
this.ctrl.setOption([this.name, 'lineY'], options); | ||
const { data, text, style = { lineDash: [8, 5], width: 2, stroke: 'red' }, } = options; | ||
const { data, text, style = { lineDash: [8, 5], width: 2, stroke: 'red' }, } = options || {}; | ||
const fn = (u) => { | ||
@@ -108,0 +109,0 @@ let ctx = u.ctx; |
{ | ||
"name": "zz-chart", | ||
"version": "0.1.0-beta.22", | ||
"version": "0.1.0-beta.23", | ||
"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
490757
12876