JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/chartist/0.7.2/chartist.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartist/0.7.2/chartist.min.js"></script>
<div class="ct-chart ct-perfect-fourth"></div>
CSS
.ct-chart .ct-series.ct-series-a .ct-area { fill: orange; }
.ct-chart .ct-series.ct-series-a .ct-line { stroke: orange; stroke-width: 3px; }
.ct-circle{fill:orange;stroke-width:5;stroke:#203135;}
body { background: #203135; }
JavaScript
var chart = new Chartist.Line('.ct-chart', {
labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
series: [
[5, 9, 7, 8, 5, 3, 5, 4,9, 23],
]
}, {
low: 0,
showArea: true,
lineSmooth: Chartist.Interpolation.simple({
divisor: 2
}),
});
chart.on('draw', function(data) {
if(data.type === 'point') {
var circle = new Chartist.Svg('circle', {
cx: [data.x], cy:[data.y], r:[9],
}, 'ct-circle');
data.element.replace(circle);
}
});