Closed cemremengu closed 7 years ago
@cemremengu Try these imports instead:
import AmCharts from 'amcharts3-react';
import 'amcharts3/amcharts/xy';
@Pauan Great thanks so much!
@cemremengu You're welcome, I'm glad I could help.
Hey there, @Pauan i'm trying to use AmChart's Gantt Chart, but I have the errors like:
Uncaught TypeError: d.AmGanttChart is not a constructor
at Object.d.makeChart (amcharts.js?c03a:11)
at Object.componentDidMount (amcharts3-react.js?08e1:265)
at Object.chainedFunction [as componentDidMount] (vendor.dll.js:97692)
at commitLifeCycles (vendor.dll.js:109743)
at commitAllLifeCycles (vendor.dll.js:111414)
at HTMLUnknownElement.callCallback (vendor.dll.js:100059)
at Object.invokeGuardedCallbackDev (vendor.dll.js:100097)
at invokeGuardedCallback (vendor.dll.js:100146)
at commitRoot (vendor.dll.js:111553)
at completeRoot (vendor.dll.js:112461)
What can I do?
@hero9 You need to include gantt.js
, like this:
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/gantt.js"></script>
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
I am trying to use the XYChart but I am getting the error
TypeError: d.AmXYChart is not a constructor
.I tried using the imports but unfortunately no luck
Is this currently implemented ?