PHP Classes

APEXCharts Laravel Charts Library: Display charts on a page using APEXCharts library

Recommend this page to a friend!
  Info   Documentation   Demos   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 48 All time: 10,739 This week: 455Up
Version License PHP version Categories
larapex-charts 1.0.4Custom (specified...7.0PHP 5, Graphics
Description 

Author

This package can be used to display charts on a page using APEXCharts library.

It provides a fluent interface to define the type and properties to configure a given chart.

The class can return an URL to a CDN Web server where the APEXCharts JavaScript library is hosted, so the library is loaded and renders the configured chart on a Web page where the chart is embedded.

Picture of Ariel Mejia Dev
Name: Ariel Mejia Dev <contact>
Classes: 1 package by
Country: Guatemala Guatemala
Age: 1935
All time rank: 44973 in Guatemala Guatemala
Week rank: 180 Up1 in Guatemala Guatemala Up

Documentation

Larapex Charts

A Laravel wrapper for apex charts library.

Installation

Use composer.

composer require arielmejiadev/larapex-charts

Usage

Basic example

In your controller add:

$chart = LarapexChart::setTitle('Posts')
                   ->setDataset([150, 120])
                   ->setLabels(['Published', 'No Published']);

Remember to import the Facade to your controller with

use ArielMejiaDev\LarapexCharts\Facades\LarapexChart

Or importing the LarapexChart class:

use ArielMejiaDev\LarapexCharts\LarapexChart;

Then in your view (Blade file) add:

 <!doctype html>
 <html lang="en">
 <head>
     <meta charset="UTF-8">
     <meta name="viewport"
           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>Chart Sample</title>
 </head>
 <body>
 
     {!! $chart->container() !!}
 
     <script src="{{ $chart->cdn() }}"></script>
 
     {{ $chart->script() }}
 </body>
 </html>

More complex example

$chart = LarapexChart::setType('area')
        ->setTitle('Total Users Monthly')
        ->setSubtitle('From January to March')
        ->setXAxis([
            'Jan', 'Feb', 'Mar'
        ])
        ->setDataset([
            [
                'name'  =>  'Active Users',
                'data'  =>  [250, 700, 1200]
            ]
        ]);

You can create a variety of charts including: Line, Area, Bar, Horizantal Bar, Heatmap, pie, donut and Radialbar.

More examples

Check the documentation on: Larapex Chart Docs

Contributing

The author Ariel Mejia Dev.

License

MIT


  Larapex Charts DocsExternal page  

Open in a separate window

Screenshots (1)  
  • Untitled.png
  Files folder image Files (23)  
File Role Description
Files folder image.idea (7 files)
Files folder imageconfig (1 file)
Files folder imagepublic (1 file)
Files folder imageresources (1 directory)
Files folder imagesrc (2 files, 1 directory)
Files folder imagetests (1 file, 2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (23)  /  .idea  
File Role Description
  Accessible without login Plain text file composerJson.xml Data Auxiliary data
  Accessible without login Plain text file larapex-charts.iml Data Auxiliary data
  Accessible without login Plain text file misc.xml Data Auxiliary data
  Accessible without login Plain text file modules.xml Data Auxiliary data
  Accessible without login Plain text file php-test-framework.xml Data Auxiliary data
  Accessible without login Plain text file php.xml Data Auxiliary data
  Accessible without login Plain text file vcs.xml Data Auxiliary data

  Files folder image Files (23)  /  config  
File Role Description
  Accessible without login Plain text file larapex-charts.php Aux. Auxiliary script

  Files folder image Files (23)  /  public  
File Role Description
  Accessible without login Plain text file apexcharts.js Data Auxiliary data

  Files folder image Files (23)  /  resources  
File Role Description
Files folder imageviews (1 directory)

  Files folder image Files (23)  /  resources  /  views  
File Role Description
Files folder imagechart (3 files)

  Files folder image Files (23)  /  resources  /  views  /  chart  
File Role Description
  Accessible without login Plain text file container.blade.php Aux. Auxiliary script
  Accessible without login Plain text file script-with-stroke.blade.php Aux. Auxiliary script
  Accessible without login Plain text file script.blade.php Aux. Auxiliary script

  Files folder image Files (23)  /  src  
File Role Description
Files folder imageFacades (1 file)
  Plain text file LarapexChart.php Class Class source
  Plain text file LarapexChartsServiceProvider.php Class Class source

  Files folder image Files (23)  /  src  /  Facades  
File Role Description
  Plain text file LarapexChart.php Class Class source

  Files folder image Files (23)  /  tests  
File Role Description
Files folder imageFeatures (1 file)
Files folder imageUnit (1 file)
  Plain text file TestCase.php Class Class source

  Files folder image Files (23)  /  tests  /  Features  
File Role Description
  Plain text file ChartsTest.php Class Class source

  Files folder image Files (23)  /  tests  /  Unit  
File Role Description
  Plain text file ChartsTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 95%
Total:48
This week:0
All time:10,739
This week:455Up