Usage of background image for charts

With parameter "canvas_class" you set css styling options for the used canvas. With it you may set a background color or background image for your chart. You may define this via a style sheet or set it inline within your article:
<style>
.cvs-euro {
    background-image: url('/media/plg_content_rgraph/images/euro.jpg');
    background-size: 100% 100%;
    background-repeat: no-repeat;";
}
</style>

Parameter for creation of chart

{rgraph height="350" width="750" title="Driving Costs - High Class <br>Top Ten" type="Bar" variant="glass"
data="Range Rover Sport 3.0,Audi Q7 3.0,Porsche Cayenne,Mercedes R 300,Porsche Panamera,Mercedes G350,
BMW 640D Coupe,Jaguar XJ 3.0 V6,Mercedes GL 350CDI,Porsche Carrera/91.8,92.5,97.9,101.6,108.4,112.3,115.9,117.3,120.2,127.7"
canvas_class="cvs-euro" yaxisScaleUnitsPost=" cent"  xaxisLabelsAngle="30"
tooltip="<b style='padding:10px; font-size:14px;'>#label#</b> <br>#val# cent per kilometer" 
debug="true" marginLeft="90" yaxisTitle="Cent per Kilometer" draw_option="wave([frames:40])"}costs{/rgraph}

 

[No canvas support]>
Source: ADAC (January 2012)

 

Important: If you want to test this sample via copy/paste, ensure that you paste with option "paste as plain text" otherwise imbedded html-codes may invalidate your input.
go back...