Standard-Charts is an open-source chart-library inspired by IBCS (unlicensed)[1]. It empowers developers to unite modern and timeless corporate financial visualization.
These steps are appropriate for plain JavaScript. Different approaches may be needed when using a framework.
First, include the library.
<script src="./standard-charts_v0.1.4.js"></script>Then call the API and include the generated .svg.
<img id="chart" />
<script>
const chart = StandardCharts({
chartType: 'COLUMN',
height: 100,
data: [
{ key: '20', AC: 29 },
{ key: '21', AC: 31 },
{ key: '22', AC: 32 },
],
});
const image = document.getElementById('chart');
image.setAttribute('src', `data:image/svg+xml;utf8,${chart}`);
</script>Now this trivial column chart should appear:
The package and the downloadable distributions are licensed under the MIT License. Everything else, including the homepage in this repository, is not licensed and unauthorized use/modification/distribution constitutes a legal violation.
[1] Hichert, R. and Faisst, J. (2022) IBCS Standards 1.2. https://www.ibcs.com/ibcs-standards-1-2/
[2] Brinton, W.C. (1914) Graphic methods for presenting facts.