amcharts / amcharts3-react

Official amCharts V3 React component
Apache License 2.0
118 stars 50 forks source link

Images are not visible #80

Closed MmtBkn closed 6 years ago

MmtBkn commented 6 years ago

Hello,

I just started using this library. I've followed steps and successfully render the graph. However, Images coming from chart is not visible.

It's trying to get images based on current route.

'localhost:3000/anotherPath/amcharts/images/dragIconRoundBig.svg' instead of

'localhost:3000/amcharts/images/dragIconRoundBig.svg'

Images are propery copied using webpack plugin to root.

new CopyWebpackPlugin([{ from: 'node_modules/amcharts3/amcharts/images', to: 'amcharts/images' },])

I have code splitting, library will be lazy loaded when user visits /anotherPath.

Thank you.

MmtBkn commented 6 years ago

I see,

There is a config variable;

pathToImages: "/amCharts/images/" and new CopyWebpackPlugin([{ from: 'node_modules/amcharts3/amcharts/images', to: 'amCharts/images' },])