Comparing version 0.0.9 to 0.1.0
@@ -97,3 +97,3 @@ import { merge } from 'lodash'; | ||
if (this.ctrl.getData().length) { | ||
this.uPlot.redraw(); | ||
this.uPlot.redraw(false); | ||
} | ||
@@ -131,4 +131,8 @@ } | ||
const shape = this.ctrl.getOption().shape; | ||
const shapes = Object.values(shape); | ||
const defaultType = Object.keys(shape)[0] || 'line'; | ||
let defaultType = 'line'; | ||
let shapes; | ||
if (shape) { | ||
shapes = Object.values(shape); | ||
defaultType = Object.keys(shape)[0] || 'line'; | ||
} | ||
return [ | ||
@@ -138,3 +142,3 @@ {}, | ||
const c = color || getChartColor(index); | ||
const type = shapes.find(d => d.name === name)?.type || defaultType; | ||
const type = shapes?.find(d => d.name === name)?.type || defaultType; | ||
return { | ||
@@ -141,0 +145,0 @@ stroke: c, |
{ | ||
"name": "zz-chart", | ||
"version": "0.0.9", | ||
"version": "0.1.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Alauda Chart", |
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
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
213008
5991