juttle / juttle-viz

Juttle Visualization Library
Apache License 2.0
11 stars 4 forks source link

Scatterchart requires 'title' to render #84

Closed ernst96 closed 8 years ago

ernst96 commented 8 years ago

When configuring a scatterchart without a title getting this error scatterchart.js Uncaught TypeError: Cannot read property 'text' of undefined

when configuring a title all is fine.

go-oleg commented 8 years ago

I cannot reproduce this, can you paste the code snippet you are using to create a scatterchart?

ernst96 commented 8 years ago

Using juttle-engine client

OSX El Capitan Chrome Version 47.0.2526.111 (64-bit)

const duration = :10m:;
const start = :now: - duration;
const end = :end:;

read influx -from start -to end -db 'sys_stats' name='cpu'
| (
    view timechart -valueField 'usage_system';
    view scatterchart -o {
        valueField: 'usage_system',
        controlField: 'usage_user',
        keyField: 'cpu'
    };
    view table
);

the chart will render partially, axis labels are displayed, the error seems to occur when attempting to determine or set the title

scatterchart.js:392 Uncaught TypeError: Cannot read property 'text' of undefined

ernst96 commented 8 years ago

Also, might be helpful.. this is what a datum in the batch looks like:

cpu: "cpu-total"
dc: "oregon"
name: "cpu"
server_name: "bob"
time: Mon Mar 21 2016 09:29:20 GMT-0700 (PDT)
usage_guest: 0
usage_guest_nice: 0
usage_idle: 99.19597989876374
usage_iowait: 0.050251256280420625
usage_irq: 0
usage_nice: 0
usage_softirq: 0
usage_steal: 0.10050251256084125
usage_system: 0.050251256280420625
usage_user: 0.6030150753650475