import Chart from 'echarts-with-react';
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { LineChart } from 'echarts/charts'
import { GridComponent } from 'echarts/components'
use([CanvasRenderer, LineChart, GridComponent])
const App = () => {
return (
<Chart
option={{
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: 'line'
}
]
}}
style={{ height: 400 }}
onClick={(params) => console.log('params:', params)}
/>
)
}
export default App
-
Notifications
You must be signed in to change notification settings - Fork 0
License
linyxria/echarts-with-react
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published