Haulmont / jmix-frontend

Monorepo for Jmix Frontend Tools and Libraries
https://www.jmix.io
Apache License 2.0
17 stars 10 forks source link

Charts addon #552

Closed vyacheslav-pushkin closed 2 years ago

vyacheslav-pushkin commented 3 years ago

Charts addon

Port Charts addon from CUBA:

Chart addon will be implented using Nivo chart library.

Nivo vs CUBA charts comparison:

Serial (11)
Charts with gaps (2)
XY (Scatter) (3)

a set of nivo examples, but they didn't completely match cuba screens https://nivo.rocks/storybook/?path=/story/scatterplot--default

Pie (3)
Radar (2)
Gantt (2)

No gantt implementation in Nivo

Gauge (3)
Funnel (2)

QA Notes

Pivot table

Usage example:

import {EntityPivotTable} from @haulmont/jmix-addon-charts;

// ...

    <EntityPivotTable<Car> 
                 entities={data.scr_CarList}
                 fields={['model', 'ecoRank', 'carType', 'mileage', 'maxPassengers', 'price']}
    />

pivot

Chart addon usage example

Example of usage components from chart addon available at https://github.com/jmix-projects/front-demo-r2/tree/vb/chart-examples

Chart addon installation

Chart addon could be installed using commands below (example based on front-demo-r2 project, commands should be executed from frontend directory )

npm install @haulmont/jmix-addon-charts@0.1.0-next.4
npx gen-jmix-front react-typescript:addon --dest src --addonPackageName @haulmont/jmix-addon-charts --model generation/projectModel.json 
GuoRuiLv commented 3 years ago

Hi @vyacheslav-pushkin ,is echarts a possible option?

vyacheslav-pushkin commented 3 years ago

Hi @lugreen

Sounds like a valid option to me.

vyacheslav-pushkin commented 3 years ago

~Superseded by https://github.com/Amplicode/amplicode-frontend/issues/38~

vyacheslav-pushkin commented 2 years ago

@vadimbasko pls add QA Notes on how to test charts

vadimbasko commented 2 years ago

@owlet1997 Examples and installation instruction added in QA Notes.