72.0.0 • Published 3 months ago

mkschart v72.0.0

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

Getting Started with Create React App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.\ Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.\ You may also see any lint errors in the console.

yarn build

Rollup bundle is created at dist/mkschart.js

Dependency

Need to import script in which react project we are going to import the mkschart

Package installation for react

yarn add mkschart

Import methods for react

import MKSChart from 'mkschart'

function App() { const data = { ticker: ticker, apiKey: apiKey, baseURL: baseURL, };

return (

<div style={{ width: '100%', height: '95vh' }}> //height and width must be define
  <MKSChart data={data} />
</div>

); }

export default App;

Import method using mkschartHTML.js bundle

import { useEffect } from 'react'; import '../mkschartHTML.js'; //path from where the bundle is imported

const MKSChart = ({ data }) => {

useEffect(() => { if (window.createMksChart) { window.createMksChart(data); } else { console.error('createMksChart function not found in the global scope.'); } }, data)

return (

<div style={{ width: '100%', height: '100%', position: 'relative' }}>
  <div id='chart-container' style={{ height: '100%' }} />
</div>

) };

export default MKSChart;

72.0.0

3 months ago

70.0.0

3 months ago

49.0.0

3 months ago

48.0.0

3 months ago

45.0.0

3 months ago

50.0.0

3 months ago

32.0.0

3 months ago

28.0.0

3 months ago

40.0.0

3 months ago

36.0.0

3 months ago

31.0.0

3 months ago

26.0.0

3 months ago

27.0.0

3 months ago

34.0.0

3 months ago

33.0.0

3 months ago

41.0.0

3 months ago

15.0.0

3 months ago

18.0.0

3 months ago

17.0.0

3 months ago

20.0.0

3 months ago

16.0.0

3 months ago

10.0.0

3 months ago

13.0.0

3 months ago

12.0.0

3 months ago

11.0.0

3 months ago

5.1.0

4 months ago

5.0.0

4 months ago

2.3.0

4 months ago

2.2.0

4 months ago

2.7.0

4 months ago

2.6.0

4 months ago

2.9.0

4 months ago

2.8.0

4 months ago

3.9.0

4 months ago

2.0.0

4 months ago

3.4.0

4 months ago

3.3.0

4 months ago

3.1.0

4 months ago

3.8.0

4 months ago

3.7.0

4 months ago

3.6.0

4 months ago

3.5.0

4 months ago

3.0.0

4 months ago

4.0.0

4 months ago

1.5.0

4 months ago

1.3.0

4 months ago

1.2.0

4 months ago

1.1.0

4 months ago

1.0.0

4 months ago