[SOLVED]-DOESN’T CHANGE THE BIZCHARTS COLOUR-REACTJS
DOESN’T CHANGE THE BIZCHARTS COLOUR-REACTJS
the following example shows how to change the color on bizchart, you only need to introduce your new colors under the “color” attribute
import react from 'react';
import reactdom from 'react-dom';
import { chart, lineadvance } from 'bizcharts';
const data = [
{
month: "jan",
city: "tokyo",
temperature: 7
},
{
month: "jan",
city: "london",
temperature: 3.9
},
{
month: "feb",
city: "tokyo",
temperature: 13
},
{
month: "feb",
city: "london",
temperature: 4.2
},
{
month: "mar",
city: "tokyo",
temperature: 16.5
},
{
month: "mar",
city: "london",
temperature: 5.7
},
];
function demo() {
return <chart padding={[10, 20, 50, 40]} autofit height={300} data={data} >
<lineadvance
shape="smooth"
point
area
position="month*temperature"
color={"city",["red","#5225ab"]}
/>
</chart>
}
reactdom.render(<demo />, mountnode);