fusioncharts / fusioncharts-dist

FusionCharts JavaScript Charting library. Over 95+ charts and 1,400+ maps to choose from, with integrations available for all popular JavaScript frameworks & back-end programming languages.
https://www.fusioncharts.com
Other
84 stars 46 forks source link

TimeSeries chart not working with column type 'interval' #20

Open JSProto opened 3 years ago

JSProto commented 3 years ago

after the groupBy operation column updatedAt is of type 'interval' and TimeSeries chart not rendered

example: ` const schema = [ { name: 'identifier', type: 'string' }, { name: 'state', type: 'string', }, { name: 'updatedAt', type: 'date', format: '%Q', } ]

const groupByDateAndState = DataStore.Operators.groupBy( [ { column: 'updatedAt', timeUnit: Utils.DatetimeUnits.Hour, outputFormat: '%Y-%m-%d %H', }, { column: 'state', outputAs: 'Status', }, ], [ { column: 'state', operation: 'count', outputAs: 'Count' } ] )

const config = { enableIndex: true, indexBy: 'updatedAt' } const store = new DataStore() store.createDataTable([], schema, config)

const table = store.getDataTable().query(groupByDateAndState)

const dataSource = { chart: { ...}, data: table }`