Justgage.js Title Font-size

Attempt to change the Title, Value, Label font-size

by Nayana Das

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/justgage/1.2.2/justgage.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.4/raphael-min.js"></script>
<div id="divDownloadOuter">
  <div id="jgDownload"></div>
</div>

CSS

#divDownloadOuter {
  width: 50%;
  clear: both;
}


/* Title */

#jgDownload text:nth-child(6) tspan {
  font-size: 0.8em !important;
}


/* Value */

#jgDownload text:nth-child(7) tspan {
  font-size: 0.5em !important;
}


/* Label */

#jgDownload text:nth-child(8) tspan,
jgDownload text:nth-child(9) tspan,
jgDownload text:nth-child(10) tspan {
  font-size: 0.9em !important;
}

JavaScript

var gD = new JustGage({
  id: "jgDownload",
  value: 0.0,
  decimals: 2,
  min: 0,
  max: 1000,
  title: "Download",
  titleFontSize: "5px",
  titlePosition: "below",
  valueFontFamily: "Georgia",
  valueFontSize: "5px",
  label: "Mbps",
  width: 300,
  height: 200,
  relativeGaugeSize: true,
  levelColors: [
    "#E63454",
    "#AC001F",
    "#F6AD37",
    "#B87200",
    "#24A081",
    "#007759",
    "#026071",
    "#015C71"
  ],
  pointer: true,
  counter: true,
});