1st README example does not pass TypeScript compiler

This issue has been tracked since 2021-10-17.

In the first example, the series of Foo, Bar and Baz fails to compile for TS.

Here is a screenshot of the error after copy / pasting.

Screen Shot 2021-10-17 at 1 00 43 AM

It's complaining that type is required on each entry, but is not present in the example.

I am not sure if the following is correct, but it passes TS

import Vizzu, { AnimTarget } from 'vizzu'

let data: AnimTarget['data'] = {
    series: [
      { name: 'Foo', values: ['Alice', 'Bob', 'Ted'], type: 'dimension' },
      { name: 'Bar', values: [15, 32, 12], type: 'measure' },
      { name: 'Baz', values: [5, 3, 2], type: 'measure' }

let chart = new Vizzu('myVizzu', { data })

If type is not actually required, perhaps make it so in the types. If it is, could you add it to the example?

simzer wrote this answer on 2021-10-17

thanks, fixed 690a55b

simzer wrote this answer on 2021-10-17

fixed in v0.3.3

More Details About Repo
Owner Name vizzuhq
Repo Name vizzu-lib
Full Name vizzuhq/vizzu-lib
Language JavaScript
Created Date 2021-06-07
Updated Date 2022-11-22
Star Count 1630
Watcher Count 19
Fork Count 65
Issue Count 17


Issue Title Created Date Updated Date