How to change the background to gradient using Rgraph open source tool

StackOverflow https://stackoverflow.com/questions/21991208

  •  15-10-2022
  •  | 
  •  

Domanda

Anyone have an example of how to set the background to appear as a gradient in Rgraph? Something like this :

http://support.softwarefx.com/JavaAPI/CfxJava65_api/SoftwareFX/ChartFX/images/GradientBackgroundObject.png

Thanks

È stato utile?

Soluzione

This was answered in the RGraph forum today:

[Formerly there was just a link, but here's some sample code instead]

new RGraph.Bar({
    id: 'cvs',
    data: [6,8,6],
    options: {
        colors: ['#888'],
        backgroundColor: 'Gradient(white:purple)',
        backgroundGrid: false,
        marginInner: 80
    }
}).draw();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top