plot: receive stringified arrays (issue #130)
This commit is contained in:
parent
3a46d25e9c
commit
3402efe0a6
3 changed files with 25 additions and 9 deletions
|
|
@ -145,10 +145,19 @@ module.exports = class _plots_base extends _canvas_base {
|
|||
|
||||
setValue(v, options={}) {
|
||||
|
||||
this.data = v
|
||||
this.batchDraw()
|
||||
if (typeof v == 'string' && v.indexOf('[') == 0) {
|
||||
v = JSON.parseFlex(v)
|
||||
}
|
||||
|
||||
if (Array.isArray(v)) {
|
||||
|
||||
this.data = v
|
||||
this.batchDraw()
|
||||
|
||||
if (options.sync) this.changed(options)
|
||||
|
||||
}
|
||||
|
||||
if (options.sync) this.changed(options)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue