Dashboards Test

HTML

<script src="https://cdn.zoomcharts-cloud.com/1/13/0/zoomcharts.js"></script>
<button onclick = "plotChart('chart1')">Plot Chart 1</button>
<button onclick = "plotChart('chart2')">Plot Chart 2</button>
<div id="chart1" style="display:none"></div>
<div id="chart2" style="display:inline"></div>

CSS

.DVSL-bar-top {
  min-height: 32px;
}

JavaScript

var bitcoins_by_Month = {
  dataLimitFrom: 1279408157,
  dataLimitTo: 1384253671,
  unit: "s",
  values: [
    [1280062860, 0.09307],
    [1282209412, 0.0769],
    [1284577510, 0.175],
    [1286988866, 0.2],
    [1289772560, 0.5],
    [1292221502, 0.3],
    [1295438521, 0.95],
    [1297635302, 1.1],
    [1300428904, 0.97],
    [1303393364, 4.14996],
    [1305747289, 9.4998],
    [1308021365, 31.9099],
    [1310688487, 16.74],
    [1313460176, 13.55],
    [1316163580, 8.7138],
    [1318917477, 5.25],
    [1329406625, 6.2],
    [1331712512, 5.45],
    [1334585184, 5.48],
    [1337032412, 5.19],
    [1339968960, 6.8],
    [1342565599, 9.7],
    [1345130283, 15.4],
    [1347658121, 12.68666],
    [1350406417, 13.0899],
    [1353158164, 12.6515],
    [1355482339, 13.90119],
    [1358620069, 21.43],
    [1360955055, 34.51541],
    [1363536829, 95.7],
    [1366088526, 266],
    [1368368125, 141.42236],
    [1371180511, 130.0],
    [1373758345, 111.652],
    [1376745412, 148.7],
    [1379147545, 148.90893],
    [1382024434, 233.4],
    [1383881325, 395]
  ]
};

var t1 = new TimeChart({
  container: document.getElementById("chart1"),
  toolbar: {
    location: "outside"
  },
  area:{
  	width: 400,
    height: 300
  },
  data: {
    units: ["s"],
    timestampInSeconds: true,
    preloaded: bitcoins_by_Month
  }
});

var t2 = new TimeChart({
  container: document.getElementById("chart2"),
  toolbar: {
    location: "outside"
  },
  area:{
  	width: 400,
    height: 300
  },
  series:[{
  	type: "line"
  }],
  data: {
    units: ["s"],
    timestampInSeconds: true,
    preloaded: bitcoins_by_Month
  }
});


function plotChart(chart) {
	if (chart === 'chart1') {
		$("#chart1").show();
    t1.updateSize();
    t1.paintNow();
  	$("#chart2").hide();
  }
  else {
		$("#chart2").show();
    t2.updateSize();
    t2.paintNow();
    $("#chart1").hide();
  }
}