The clipping option can be one of multiple formats so you can easily restrict the drawing on the canvas to a shape, half of the canvas, a percentage of the scale (for scaled charts eg Bar, Line, Scatter) or a specific scale value.
Parameter for creation of chart
1. Line Chart
{rgraph title="Line Chart using Clipping Option" type="Line" width="700" height="350" backgroundImage="null" data="4,10,10,3,2,4,-5,-4,-5,-6,-1,9,1,2,3,5,7,4,-2,-2,6,2,3,4,4,8,6,2,3,5,1,4,9,5,6,4,-3,-8,-10,-5,6,4,5,1,2,3,4,6" textSize="13" xaxisPosition="center" backgroundGridHlinesCount="10" backgroundGridVlines="false" backgroundGridBorder="false" shadow="false" linewidth="2" colors="red" filled="true" filledColors="rgba(255,128,128,0.25)" marginInner="15" spline="true" clip="scale:0-max" xaxisTickmarksCount="12"}cvs{/rgraph}
2. Line Chart
{rgraph type="Line" combine_chart="1" width="700" height="350" data="4,10,10,3,2,4,-5,-4,-5,-6,-1,9,1,2,3,5,7,4,-2,-2,6,2,3,4,4,8,6,2,3,5,1,4,9,5,6,4,-3,-8,-10,-5,6,4,5,1,2,3,4,6" textSize="13" xaxisPosition="center" backgroundGridHlinesCount="10" backgroundGridVlines="false" backgroundGridBorder="false" shadow="false" linewidth="2" filled="true" marginInner="15" spline="true" xaxisTickmarksCount="12" colors="#990" filledColors="rgba(128,128,255,0.25)" clip="scale: bottomhalf"}cvs{/rgraph}
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...