You can find chart modules here
Follow the steps in the README of the chart module's repo.
The basic steps are:
yarn add <chart module repo URL>
NOTE: If you get errors, check that the path files in the import lines, both in app.js and css, are correct.
For example:
If you're using the categorical bar chart module, double check that the path in import barChart from '@reuters-graphics/chart-module-categorical-bar-chart'
(js file) and @import '~@reuters-graphics/chart-module-line-chart/src/scss/chart'
(css) matches the filename in node_modules/@reuters-graphics
yarn add <ADD REPO URL FOR CHART MODULE HERE>
ejector
and select the chart module you yarn-added. Select both JS and CSS.js/<chart module name>/index.js
and scss/<chart module name>/_chart.scss
import
linesFor example, for this categorical bar chart module, the import lines on its README are:
For JS:
import barChart from '@reuters-graphics/chart-module-categorical-bar-chart';
For CSS:
@import '~@reuters-graphics/chart-module-categorical-bar-chart/src/scss/chart';
When using ejector, these two lines should be:
For JS:
import barChart from './chart-module-categorical-bar-chart';
For CSS:
@import './chart-module-categorical-bar-chart/_chart';