Skip to content
Snippets Groups Projects
Commit c8fe9a29 authored by Kevin Hill's avatar Kevin Hill
Browse files

fixing bug where setOptions does not process png and material attributes

moving contributors from composer to separate file
parent dfe57a28
No related branches found
No related tags found
No related merge requests found
- 3.1.9
- Fixing bug where using `setOptions` instead of the constructor skipped the processing of `png` and `material` attributes.
- 3.1.8
- Production build of the Lava.js module.
- 3.1.7
- Added the tag lavacharts to the config publishing.
Use `php artisan vendor:publish --tag=lavacharts`
If that does not work, try to clear the cache with `php artisan config:clear` and re-publish with `--force`.
- 3.1.6
- The event callback within lava.js was modified to pass back the chart and the datatable so users can interact with either during an event. This solves issue [#203](https://github.com/kevinkhill/lavacharts/issues/203)
- 3.1.5
- Adding DonutChart alias class back
- 3.1.4
- Chart's should resize properly on page resize.
- 3.1.3
- Adding support for date columns to be null which enables support for Gantt charts to have linked sections.
- Adding JavascriptDate class that mimics the way the Javascript Date object is created. (I wanted to be able to copy and paste google's examples into addRows)
- 3.1.1 & 3.1.2
Loading
Loading
# Contributors
Thank you for finding bugs, helping me fix them, pull requests, issues and anything else.
- [deringer](https://github.com/deringer)
- [MicahKV](micah138@yahoo.com)
- [rajivseelam](https://github.com/rajivseelam)
- [SendDerek](https://github.com/SendDerek)
- [stevebauman](https://github.com/stevebauman)
- [Stonos](https://github.com/Stonos)
- [tobias-kuendig](https://github.com/tobias-kuendig)
- [twify93](https://github.com/twify93)
If your name is not on this list and needs to be, I'm sorry! Please add it in a pull request and I will merge it in.
# Lavacharts 3.1.8
# Lavacharts 3.1.9
 
[![Total Downloads](https://img.shields.io/packagist/dt/khill/lavacharts.svg?style=plastic)](https://packagist.org/packages/khill/lavacharts)
[![License](https://img.shields.io/packagist/l/khill/lavacharts.svg?style=plastic)](http://opensource.org/licenses/MIT)
Loading
Loading
@@ -59,7 +59,11 @@ If you are using Lavacharts with Silex, Lumen or your own Composer project, that
## Laravel
To integrate Lavacharts into Laravel, a ServiceProvider has been included.
 
### Laravel 5.x
### Laravel ~5.5
Thanks to the fantastic new [Package Auto-Discovery](https://laravel-news.com/package-auto-discovery) feature added in 5.5, you're ready to go, no extra configuration required :)
### Laravel ~5.4
Register Lavacharts in your app by adding these lines to the respective arrays found in `config/app.php`:
```php
<?php
Loading
Loading
@@ -84,7 +88,7 @@ To modify the default configuration of Lavacharts, datetime formats for datatabl
Publish the configuration with `php artisan vendor:publish --tag=lavacharts`
 
 
### Laravel 4.x
### Laravel ~4
Register Lavacharts in your app by adding these lines to the respective arrays found in `app/config/app.php`:
 
```php
Loading
Loading
Loading
Loading
@@ -15,46 +15,6 @@
"name": "Kevin Hill",
"email": "kevinkhill@gmail.com",
"role": "Creator"
},
{
"name": "twify93",
"homepage": "https://github.com/twify93",
"role": "Contributor"
},
{
"name": "SendDerek",
"homepage": "https://github.com/SendDerek",
"role": "Contributor"
},
{
"name": " MicahKV",
"email": "micah138@yahoo.com",
"role": "Contributor"
},
{
"name": "deringer",
"homepage": "https://github.com/deringer",
"role": "Contributor"
},
{
"name": "stevebauman",
"homepage": "https://github.com/stevebauman",
"role": "Contributor"
},
{
"name": "rajivseelam",
"homepage": "https://github.com/rajivseelam",
"role": "Contributor"
},
{
"name": "tobias-kuendig",
"homepage": "https://github.com/tobias-kuendig",
"role": "Contributor"
},
{
"name": "Stonos",
"homepage": "https://github.com/Stonos",
"role": "Contributor"
}
],
"support": {
Loading
Loading
@@ -79,7 +39,6 @@
},
"require-dev": {
"phpunit/phpunit": "~4.8",
"mybuilder/phpunit-accelerator": "~1.1",
"mockery/mockery": "~0.9",
"squizlabs/php_codesniffer": "~2.5",
"satooshi/php-coveralls": "~1.0",
Loading
Loading
@@ -100,5 +59,10 @@
"lavajs:pull" : "git subtree --prefix=javascript pull lavajs master",
"lavajs:push" : "git subtree --prefix=javascript push lavajs master"
},
"config": {
"platform": {
"php": "5.4"
}
},
"minimum-stability": "stable"
}
Loading
Loading
@@ -53,8 +53,35 @@ class Chart extends Customizable implements Renderable, Wrappable, Jsonable, Vis
if (array_key_exists('elementId', $options)) {
$this->elementId = new ElementId($options['elementId']);
}
$this->setExtendedAttributes();
}
 
/**
* Set extended chart attributes from the assigned options, if present.
*
* @since 3.1.9
*/
protected function setExtendedAttributes()
{
if (method_exists($this, 'setPngOutput') &&
array_key_exists('png', $this->options))
{
$this->setPngOutput($this->options['png']);
unset($this->options['png']);
}
if (method_exists($this, 'setMaterialOutput') &&
array_key_exists('material', $this->options))
{
$this->setMaterialOutput($this->options['material']);
unset($this->options['material']);
}
}
/**
* Returns the chart type.
*
Loading
Loading
Loading
Loading
@@ -59,20 +59,30 @@ class Customizable implements \ArrayAccess, \JsonSerializable
*
* @param string $option
* @param mixed $value
* @return self
*/
public function setOption($option, $value)
{
$this->options[$option] = $value;
return $this;
}
 
/**
* Sets the values of the customized class with an array of key value pairs.
*
* @param array $options
* @return self
*/
public function setOptions(array $options)
{
$this->options = $options;
if (method_exists($this, 'setExtendedAttributes')) {
$this->setExtendedAttributes();
}
return $this;
}
 
/**
Loading
Loading
@@ -80,10 +90,13 @@ class Customizable implements \ArrayAccess, \JsonSerializable
*
* @since 3.0.5
* @param array $options
* @return self
*/
public function mergeOptions(array $options)
{
$this->options = array_merge($this->options, $options);
return $this;
}
 
/**
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment