72.0.0 • Published 2 years ago

mkschart v72.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years 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

2 years ago

70.0.0

2 years ago

49.0.0

2 years ago

48.0.0

2 years ago

45.0.0

2 years ago

50.0.0

2 years ago

32.0.0

2 years ago

28.0.0

2 years ago

40.0.0

2 years ago

36.0.0

2 years ago

31.0.0

2 years ago

26.0.0

2 years ago

27.0.0

2 years ago

34.0.0

2 years ago

33.0.0

2 years ago

41.0.0

2 years ago

15.0.0

2 years ago

18.0.0

2 years ago

17.0.0

2 years ago

20.0.0

2 years ago

16.0.0

2 years ago

10.0.0

2 years ago

13.0.0

2 years ago

12.0.0

2 years ago

11.0.0

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

2.3.0

2 years ago

2.2.0

2 years ago

2.7.0

2 years ago

2.6.0

2 years ago

2.9.0

2 years ago

2.8.0

2 years ago

3.9.0

2 years ago

2.0.0

2 years ago

3.4.0

2 years ago

3.3.0

2 years ago

3.1.0

2 years ago

3.8.0

2 years ago

3.7.0

2 years ago

3.6.0

2 years ago

3.5.0

2 years ago

3.0.0

2 years ago

4.0.0

2 years ago

1.5.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago