Can the SVG Bar chart have a watermark image?

Posted by watermark in bar chart at 09:36 on Friday 19th February 2021 [link]
can we add watermark in SVG Bar chart ? diagonally ?

Posted by Richard at 12:53 on Friday 19th February 2021 [link]
You can add a background image like this:

bar = new RGraph.SVG.Bar({
    id: 'cc',
    data: [5,9,6,3,2,6,7],
    options: {
        marginInner: 20,
        xaxisLabels: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],
        backgroundGridVlines: false,
        backgroundGridBorder: false,
        xaxis: false,
        yaxis: false,
        backgroundImage: '/images/logo.png',
        backgroundImageStretch: false,
        backgroundImageX: 35,
        backgroundImageY: 35,
        backgroundImageW: 64,
        backgroundImageH: 64,

// Rotate the image 45 degrees about the coordinates (67,67)
bar.svg.all.getElementsByTagName('image')[0].setAttribute('transform','rotate(45 67 67)');

Is that the sort of thing you wanted?

[Replies are now closed]