PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!

  Author Author  
Name: Ariel Mejia Dev <contact>
Classes: 1 package by
Country: Guatemala Guatemala


  Detailed description   Download Download .zip .tar.gz  
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.

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


  Classes of Ariel Mejia Dev  >  APEXCharts Laravel Charts Library  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog (1)  >  RSS 1.0 feed RSS 2.0 feed Latest changes  

 

Name: APEXCharts Laravel Charts Library
Base name: larapex-charts
Description: Display charts on a page using APEXCharts library
Version: 1.0.4
PHP version: 7.0
License: Custom (specified in a license file)
 
  Groups   Screenshots Screenshots   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Graphics Colors, images, charts and picture formats View top rated classes

  Files folder image Screenshots  
Untitled.png
File Role Description
Accessible without login Image file Untitled.png Screen Pie chart


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  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

Download Download all files: larapex-charts.tar.gz larapex-charts.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.