Skip to content

Instantly share code, notes, and snippets.

@AlmisbahTS
Created December 9, 2021 19:41
Show Gist options
  • Select an option

  • Save AlmisbahTS/1bfb13b468074ee37a76478cb09df9d2 to your computer and use it in GitHub Desktop.

Select an option

Save AlmisbahTS/1bfb13b468074ee37a76478cb09df9d2 to your computer and use it in GitHub Desktop.
Creating your first ApexChart
<div id="chart">
</div>
var options = {
chart: {
type: 'bar'
},
series: [{
name: 'sales',
data: [30,40,45,50,49,60,70,91,125]
}],
xaxis: {
categories: [1991,1992,1993,1994,1995,1996,1997, 1998,1999]
}
}
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
@import url(https://fonts.googleapis.com/css?family=Roboto);
body {
font-family: Roboto, sans-serif;
}
#chart {
max-width: 650px;
margin: 35px auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment