Have updated the component code in the first snippet since the article was first published. Please take a look.
Here's how I am using it inside an app:
<Grid item> <ReactECharts option={{.......whatever options object we want to add........}} /> </Grid>
An valid option prop can be:
option
{ dataset: { source: [ ["Commodity", "Owned", "Financed"], ["Commodity 1", 4, 1], ["Commodity 2", 2, 4], ["Commodity 3", 3, 6], ["Commodity 4", 5, 3], ], }, tooltip: { trigger: "axis", axisPointer: { type: "shadow", }, }, legend: { data: ["Owned", "Financed"], }, grid: { left: "10%", right: "0%", top: "20%", bottom: "20%", }, xAxis: { type: "value", }, yAxis: { type: "category", }, series: [ { type: "bar", stack: "total", label: { show: true, }, }, { type: "bar", stack: "total", label: { show: true, }, }, ], }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Have updated the component code in the first snippet since the article was first published. Please take a look.
Here's how I am using it inside an app:
An valid
option
prop can be: