This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@impetusuxp/vizualy-area-chart) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Area Chart
Installation
Use the package manager NPM to install Area Chart.
npminstall @impetusuxp/vizualy-area-chart
Sample Data (Chart's required data format)
const data = [
{ key: 'area-1', "date": new Date("2017-04-23 00:00:00"), "count": 10.78 },
{ key: 'area-1', "date": new Date("2017-04-24 00:00:00"), "count": 56.54 },
{ key: 'area-1', "date": new Date("2017-04-25 00:00:00"), "count": 23.85 },
{ key: 'area-1', "date": new Date("2017-04-26 00:00:00"), "count": 80 },
{ key: 'area-1', "date": new Date("2017-04-23 00:00:00"), "count": -15.78 },
{ key: 'area-1', "date": new Date("2017-04-24 00:00:00"), "count": 40.54 },
{ key: 'area-1', "date": new Date("2017-04-25 00:00:00"), "count": -23.85 },
{ key: 'area-1', "date": new Date("2017-04-26 00:00:00"), "count": 60 }
];
Usage
import AreaChart from '@impetusuxp/vizualy-area-chart';
const areaChart = new AreaChart();
// Draw chart
areaChart
.container('containerID')
.x('x axis key in data') // Referred as "date" key in sample Data
.y('y axis key in data') // Referred as "count" key in sample Data
.area(key) // Referred as "key" key in sample Data
.data(data object) // Referred to sample data
.settings(chart configuration object)
.draw();
// Update chart
areachart.data(updated data object).update();
<script type="text/javascript" src="./libs/d3.v6.min.js"></script>
<script type="text/javascript" src="./vizualy-assistant/src/js/utility.js"></script>
<script type="text/javascript" src="./vizualy-assistant/src/js/assistant.js"></script>
<script type="text/javascript" src="./vizualy-assistant/src/js/observer.js"></script>
<script type="text/javascript" src="./vizualy-area-chart/vizualy-area-chart.js"></script>
<script>
const areachart = new vizualy.AreaChart();
// Draw chart
areaChart
.container('containerID')
.x('x axis key in data') // Referred as "date" key in sample Data
.y('y axis key in data') // Referred as "count" key in sample Data
.area(key) // Referred as "key" key in sample Data
.data(data object) // Referred to sample data
.settings(chart configuration object)
.draw();
// Update chart
areaChart.data(updated data object).update();
</script>
Make sure to use/import vizualy-assistant/src/css/common.css in your code-base as per recommended by frontend framework being used