0

I am new in Reactjs. I am integrating admin theme that contain JS libraries like graph,tooltip etc. I am facing issue it produce errors and also dropdown not working. My index.html file is with js files

<script src="./assets/js/main/jquery.min.js"></script>
<script src="./global_assets/js/main/bootstrap.bundle.min.js"></script>
<script src="./global_assets/js/plugins/loaders/blockui.min.js"></script>
<!-- /core JS files -->
<!-- Theme JS files -->
<script src="./global_assets/js/plugins/visualization/d3/d3.min.js"></script>
<script src="./global_assets/js/plugins/visualization/d3/d3_tooltip.js"></script>
<script src="./global_assets/js/plugins/forms/styling/switchery.min.js"></script>
<script src="./global_assets/js/plugins/ui/moment/moment.min.js"></script>
<script src="./global_assets/js/plugins/pickers/daterangepicker.js"></script>

<script src="assets/js/app.js"></script>
<script src="./global_assets/js/demo_pages/dashboard.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/streamgraph.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/sparklines.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/lines.js"></script>   
<script src="./global_assets/js/demo_charts/pages/dashboard/light/areas.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/donuts.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/bars.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/progress.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/heatmaps.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/pies.js"></script>
<script src="./global_assets/js/demo_charts/pages/dashboard/light/bullets.js"></script>
<!-- /theme JS files -->

and i am getting these issues enter image description here and also dropdown not working how I can solve it.

1 Answer 1

0

You can use npm packages for the same.

  1. react-d3-graph for d3 graphs
  2. moment for moment
  3. react-datepicker for date picker

Install npm packages using npm install command

Import them on your React Component whenever you want to use them using import command

import moment from 'moment';
import { Graph } from "react-d3-graph";

Check documentation of packages before implementing the same.

Sign up to request clarification or add additional context in comments.

1 Comment

let me know in case you are still facing any issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.