There is no license information available for the latest version (1.0.4) of this package.

Chart renderer for Numerolog data sources

1.0.4 2015-09-10 01:29 UTC

This package is auto-updated.

Last update: 2023-03-12 00:42:44 UTC


Build Status Coverage Status

Thin client to access Numerolog counters and render then as graphs using the Lavacharts library ( which in turn uses Google's powerful Charts package ( The client pulls values from a Numerolog package using a token, then renders the data sets as a nice chart. All graph types and options of Google Charts are supported.

Being Javascript based, this charting package is obviously limited to browser-based use.


Use composer:

composer require namelesscoder/numerolog-lavacharts


Then either integrate from anywhere by calling methods manually with an array as input:

$query = new \NamelessCoder\NumerologLavacharts\ChartQuery($_GET);
$chart = new \NamelessCoder\NumerologLavacharts\NumerologChart();
echo $chart->renderChartQuery($query);

Alternatively, do the same but configure the ChartQuery manually:

$query = new \NamelessCoder\NumerologLavacharts\ChartQuery();
$query->setChartLabel('My special chart');
$chart = new \NamelessCoder\NumerologLavacharts\NumerologChart();
echo $chart->renderChartQuery($query);

The output will include both the <div> that will contain the graph as well as every dependency required by Google Charts to render the graph. Graph data is converted to a JavaScript array that is embedded in the HTML.


To render the graphs anywhere other than on the host that generates the chart - which you may for example want to do if you are using the public Numerolog end-point - simply load the response body of the HTTP request and output it in your own HTML document. The example below is the extremely basic implementation of that principle:

<head>My chart document</head>
<?php file_get_contents('http://numerolog....'); ?>

Since the default output already contains both <script> tag and <div> there's nothing more you need to do before the chart is displayed. Change the URL parameters to affect how the chart itself is rendered - see below!

Public implementation

A publicly available graph rendering is available from:

It accepts plain old GET parameters:


And native parameters for basic chart configuration:


And the special chartAttributes (which correspond to Google Chart configurations):


And they all must be specified together. Required arguments are:

  • package
  • counter
  • token
  • action (only get is supported)

Plus the following references for other arguments:

Note that the Google Chart options you can use will always depend on the type of chart you are rendering.