I am updating an old .aspx webpage witch renders time-series area charts. The page uses JS library Timeplot which is outdated and I am looking for a new JS library to render the charts.
I have come across this JS library metricsgraphicsjs. But I am unable to render the chart into the .aspx page. For testing, I am using one of their code examples. Below is the code I am using.
<script type="text/javascript" src="MetricsGraphics/dist/bundle.js"></script>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script type="text/javascript">
d3.json('js/data/research.json', function (data) {
data = MG.convert.date(data, 'date');
MG.data_graphic({
title: "Line Chart",
description: "This is a simple line chart. You can remove the area portion by adding area: false to the arguments list.",
data: data,
width: 600,
height: 200,
right: 40,
target: document.getElementById('myArea-timeplot'),
x_accessor: 'date',
y_accessor: 'value'
});
});
</script>
<div id="myArea-timeplot" style="height: 450px; margin-left: 1em; margin-bottom: 4em; width: 850px;"></div>
What I am missing? Does this library work on .Net?