I have a hbar bar looking like:
I wanted to add additional column at the end to display bar values. I want to add 2 columns to display number 2 and 3 on the first row.
I want my graph to look like this:
I tried to append in the svg but It is not showing.
What is the proper way to dynamically add additional Columns in rgraph for SG?
FYI
I added the columns using jquery
data = obj.data;
$.each(obj.properties.yaxisLabels, function(i, v) {
var nodes = RGraph.SVG.text.find({
object: obj,
text: v
});
RGraph.SVG.text({
object: obj,
parent: obj.svg,
text: Math.round(data[i][0]),
x: +$(nodes).attr('x') + obj.graphWidth + 8,
y: $(nodes).attr('y'),
halign: 'left',
valign: 'center',
// background: '#FFDE00',
size: 12,
// padding: 1,
color: 'black',
// color: '#999'
});
RGraph.SVG.text({
object: obj,
parent: obj.svg,
text: Math.round(data[i][1]),
x: +$(nodes).attr('x') + obj.graphWidth + 23,
y: $(nodes).attr('y'),
halign: 'left',
valign: 'center',
// background: '#097054',
backgroundGridVlines: true,
backgroundGridBorder: true,
size: 12,
color: 'black'
// padding: 1,
// color: '#999'
});
})