Dim jg As JSONGenerator
jg.Initialize2(listY)
Dim jg2 As JSONGenerator
jg2.Initialize2(listX)
WebView1.LoadHtml($"
<canvas id="linechart" width=${WebView1.prefWidth-10dip} height=${WebView1.prefHeight-20dip}></canvas>
<script src=${WebViewAssetFile("Chart.js")}></script>
<script>
var ctx = document.getElementById("linechart");
ctx.style.backgroundColor = 'rgba(255,255,255,255)';
var linechart = new Chart(ctx,{
type: 'line',
data: {
labels: ${jg2.ToString},
datasets: [{
data: ${jg.ToString},
label: Luminarias,
borderColor: "rgba(255, 116, 0, 1)",
fill: True,
backgroundColor: "rgba(255, 116, 0, 0.7)"
}
]
},
options: {
responsive: False,
animation: False,
title: {
display: False,
text: 'World population per region (in millions)'
}
}
});
</script>
"$)