kevinkhill / lavacharts

Lavacharts is a graphing / charting library for PHP 5.4+ that wraps Google's Javascript Chart API.
http://lavacharts.com
Other
619 stars 142 forks source link

Hide/Show Rows of data #310

Closed cognhuepan closed 5 years ago

cognhuepan commented 5 years ago

What Version?

3.1.11

Issue

I want to hide and/or show data columns by clicking on its label, selecting in combobox, or selecting in any other similar way.

I've read that with google charts is possible via DataView, but I haven't been able to do so with lavacharts

is there a wrapper function or any other way to do it?

Any help would be greatly appreciated.

Controller Code (chart creation code)

<?php

use Khill\Lavacharts\Lavacharts;

$lava = new Lavacharts;

$data = $lava->DataTable();

$data->addDateTimeColumn('Date')
             ->addNumberColumn('Gas1')
             ->addNumberColumn('Gas2')
             ->addNumberColumn('Gas3')
             ->addRow(['2019-05-24 12:03',  67, 65, 62])
             ->addRow(['2019-05-24 12:04',  68, 65, 61])
             ->addRow(['2019-05-24 12:05',  68, 62, 55])
             ->addRow(['2019-05-24 12:06',  72, 62, 52])
             ->addRow([2019-05-24 '12:07',  61, 54, 47])
             ->addRow([2019-05-24 '12:08',  70, 58, 45]);

$lava->LineChart('Minute Graph', $data, [
    'title' => 'Gases Concentration'
]);

View Code

<div id="graph"></div>

<?=$lava->render("LineChart","Minute Graph","graph");?>

Best Regards

kevinkhill commented 5 years ago

Honestly, I have no idea, and no intention of digging into it anytime soon. Lavacharts is not abandoned, but I have no personal free time to work on it. I am doing my best to field PRs and answer issues and that is the best I can do for now.

I'm sorry, and thank you for using Lavacharts!