codesuki / react-d3-components

D3 Components for React
http://codesuki.github.io/react-d3-components/example.html
MIT License
1.63k stars 206 forks source link

how to increase column width of barchar and yAix value default like 0 to 100 #175

Open preetvyas opened 4 years ago

preetvyas commented 4 years ago

currentbarchart the above image is currently in react-d3-component but i want to make it below image so issue is that how to set yaxix value and coloumn widht increase destinationbarchart

Here is my code

const datasheet= [{ label: 'somethingA',

values: [{x: 'Jan', y: 57}, {x: 'Feb', y: 62}, {x: 'Mar', y: 9},
{x:'Apr',y:3},
{x:'May',y:66},
{x:'Jun',y:10},
{x:'Jul',y:28},
{x:'Aug',y:56},
{x:'Sep',y:83},
{x:'Oct',y:11},
{x:'Nov',y:75},
{x:'Dec',y:93}

] }];

var tooltipScatter = function(x, y0, y) {

// return "x: " + y0 + " y: " + y; return y

};

<BarChart tooltipHtml={tooltipScatter} data={datasheet} width={500} height={500}

    yAxis={[0,100]}
    margin={{top: 10, bottom: 50, left: 50, right: 10}}

    />

Please reply as soon as possible