A Pen by ApexCharts on CodePen.
Created
December 9, 2021 19:41
-
-
Save AlmisbahTS/1bfb13b468074ee37a76478cb09df9d2 to your computer and use it in GitHub Desktop.
Creating your first ApexChart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="chart"> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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