ricardodorosario / react-horizontal-stacked-bar-chart

React horizontal stacked bar responsive chart component
MIT License
19 stars 10 forks source link

Displaying values within the stacked bars #3

Closed hnhegde closed 5 years ago

hnhegde commented 5 years ago

Hello, ShowText[Up | Down] options display the title and value together, either within the bars, above them or below them. How can I make the title appear on the top and the value inside the bars? Kindly advise,

Thanks, Harsha

ricardodorosario commented 5 years ago

Hi Harsha,

I didn't make the component to be displayed like this. You could try not pass the 'name' param and pass the 'showText' param. It does the value show inside the bars without the title like this:

<HSBar showText data={[ { value: 10000, description: "10.000" }, { value: 5000, description: "5.000" }, { value: 3000, description: "3.000" } ]} />

Even so I will try to change the component accord your case.