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

Recommend this page to a friend!
  Info   View files Documentation   Demos   Screenshots Screenshots   View files View files (22)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2020-01-20 (10 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 27 All time: 10,055 This week: 104Up
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: 1931
All time rank: 43743 in Guatemala Guatemala
Week rank: 523 Up2 in Guatemala Guatemala Up

 

Details

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  
Screenshots  
  • Untitled.png
  Files folder image Files  
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  /  .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  /  config  
File Role Description
  Accessible without login Plain text file larapex-charts.php Aux. Auxiliary script

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

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

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

  Files folder image Files  /  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  /  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  /  src  /  Facades  
File Role Description
  Plain text file LarapexChart.php Class Class source

  Files folder image Files  /  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  /  tests  /  Features  
File Role Description
  Plain text file ChartsTest.php Class Class source

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

 Version Control Unique User Downloads Download Rankings  
 95%
Total:27
This week:0
All time:10,055
This week:104Up

For more information send a message to info at phpclasses dot org.