Justgage.js Change Title,Value,Label font-size

Amit Shah picture Amit Shah · Jun 7, 2016 · Viewed 7.3k times · Source

enter image description here

I am trying the reduce the font-size using [titleFontSize: 12..] and various combinations. but not working. same i used for [valueFontSize: ..] & [labelFontSize: ..]

How can i change the font-size of Title,Value & Labels?

Code:

<script src="js/raphael-2.1.4.min.js"></script>
<script src="js/justgage.js">

<script type="text/javascript">
  var gD = new JustGage({
    id: "jgDownload",
    value: 67,
    decimals: 2,
    min: 0,
    max: 1000,
    title: "Download",
    titleFontSize: 12,
    titlePosition: "below",
    titleFontColor: "red",
    titleFontFamily: "Georgia",
    titlePosition: "below",
    valueFontColor: "blue",
    valueFontFamily: "Georgia"
    label: "Mbps",
    lableFontSize: "10px",
    width: 300,
    height: 200,
    relativeGaugeSize: true,
    levelColors: [
          "#E63454",
          "#AC001F",
          "#F6AD37",
          "#B87200",
          "#24A081",
          "#007759",
          "#026071",
          "#015C71"
        ],
    pointer: true,
    counter: true,    
  });
</script>

JSFiddle: Link

Answer

Priyank Dey picture Priyank Dey · Jun 7, 2016

Try with titleMinFontSize. It will work.

titleMinFontSize: 20,

Check this link for other attributes.