Gauge chart - I want to make the big ticks smaller in length

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Mark Farrer on 8th December 2016
I am trying to make the basic gauge demo smaller in size (150 x 150). I am just having a problem making the big ticks smaller in length.

     <canvas id="cvs2" width="150" height="150">[No canvas support]</canvas>

         gauge = new RGraph.Gauge({
             id: 'cvs2',
             min: 0,
             max: 100,
             value: 100,
             options: {
              anglesStart: RGraph.PI - (RGraph.PI / 6),
                 anglesEnd: RGraph.TWOPI + (RGraph.PI / 6),
              borderWidth: 1,
              textSize: 7,
     backgroundColor: '#000000',
                 textColor: 'white',
                 tickmarksBig: 10,
                 tickmarksSmall: 0,
                 labelsCount: 10,
                 tickmarksBigColor: 'white',
                 tickmarksSmallColor: 'white',
                 redColor: 'rgba(0,0,0,0)',
                 yellowColor: 'rgba(0,0,0,0)',
                 borderInner: 'white',
                 borderOuter: 'Gradient(white:black)',
                 textAccessible: true,
                 valueText: true,
                 valueTextDecimals: 0,
     valueTextBoundingStroke: '#aaa',
     valueTextYPos: 0.6,
                 labelsCentered: true,
                 labelsOffsetAngle: 0,
                 labelsOffsetRadius: 3,
                 labelsOffsetx: 0,
                 labelsOffsety: 0

Posted by Richard on 8th December 2016
Hi there,

There's no option for the length - but if you're comfortable editing the source you could do that.

Looking at it it's on line 645 and where there's "- 10 - 10" change that to to "- 10 - 5" (or something similar.


Add a reply

« Back to message list