1. Components
  2. Charts

Third-Party Plugins

Tailwind CSS Charts

Charts are graphical representations used to showcase and simplify complex data sets, making information more comprehensible and visually appealing. They vary in types-from line to bar to pie-each highlighting specific data patterns and trends.

Requires Additional Installation

Note that this component requires the use of the third-party Apexcharts plugin.

How to use

  1. Install Apexcharts

    Install apexcharts via npm

    Terminal
                          
                            npm i apexcharts
                          
                        
  2. Add the Apexcharts CSS

    Include the CSS <script> near the end of your </head> tag:

    HTML
                          
                        
  3. Add the Apexcharts JavaScript

    Include the JavaScript <script> near the end of your </body> tag:

    HTML
                          
                        

    Certain JavaScript Helpers in Preline UI make use of Lodash plugin. Don't forget to install it, if you haven't done so already: npm i lodash

  4. Add the Preline Helper JavaScript

    Include the JavaScript <script> after the helper-apexcharts.js file.

    HTML
                          
                        

Single area chart

Multiple area chart

Income
Outcome

Multiple area chart (Compare Two Tooltip)

Income
Outcome

Multiple area chart (Compare Two Tooltip Alternative)

Income
Outcome

Curved area charts

Use curve: 'smooth' to make the chart lines curved.

Income
Outcome

Single bar chart

Multiple bar charts

Income
Outcome

Single line chart

Multiple line charts

Income
Outcome
Others

Curved line charts

Use curve: 'smooth' to make the chart lines curved.

Income
Outcome
Others

Horizontal bar chart

Doughnut chart

Income
Outcome
Others

Bubble chart

Income
Outcome
Others

Pie chart

Income
Outcome
Others

Small sized sparklines

  • Chart Types
  • Inline area chart
  • Inline bar chart
  • Inline pie chart
  • Inline line chart
  • Inline candles chart