how to give space between bar and it's label?

38 Views Asked by At

I am using RGraph in Angular7 and i want to apply space between bar and it's label

enter image description here

1

There are 1 best solutions below

2
Richard On BEST ANSWER

Looking at the style of the chart you might need to upgrade and then you could add the property yaxisLabelsOffsetx to your configuration. Here's an example:

new RGraph.HBar({
    id:'cvs',
    data: [8,4,6,3],
    options: {
        marginInner: 10,
        variant: '3d',
        xaxis: false,
        yaxis: false,
        labelsAbove: true,
        labelsAboveOffsetx: 10,
        yaxisLabels: ['Jimmy','James','Tabatha','Richard']
    }
}).draw();

And a codepen of the example is here:

https://codepen.io/rgraph/pen/mdReQmm