Merged branch with master

This commit is contained in:
Achilles Rasquinha 2017-11-03 18:30:59 +05:30
commit c8e6afca3e
7 changed files with 23 additions and 12 deletions

View File

@ -1,7 +1,14 @@
<!-- Thank you so much for contributing! We're glad to have you onboard :) -->
<!-- Please help us understand you contribution better with these details -->
###### Explanation About What Code Achieves:
<!-- Please explain why this code is necessary / what it does -->
- Explanation
###### Screenshots/GIFs:
<!-- As this is mainly a visual lib, please include a screenshot/gif if your contribution modifies on-screen components -->
- Screenshot
###### Steps To Test:
<!-- What would someone do to be able to see the effects of your code? -->
- Steps

View File

@ -4,7 +4,7 @@
<p align="center">
<p>GitHub-inspired modern, intuitive and responsive charts with zero dependencies</p>
<a href="https://frappe.github.io/charts">
<b>Explore the Demos »</b>
<b>Explore Demos »</b>
</a>
</p>
</div>
@ -36,7 +36,7 @@
</a>
</p>
### Table of Contents
### Contents
* [Installation](#installation)
* [Usage](#usage)
* [License](#license)
@ -56,9 +56,8 @@
#### Usage
```js
const data = {
labels: ["12am - 3am", "3am - 6pm", "6am - 9 A.M",
"9am - 12am", "12pm - 3pm", "3pm - 6pm",
"6pm - 9pm", "9am - 12am"
labels: ["12am-3am", "3am-6pm", "6am-9am", "9am-12am",
"12pm-3pm", "3pm-6pm", "6pm-9pm", "9am-12am"
],
datasets: [
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,12 +4,10 @@ import Chart from '../charts';
export default class BaseChart {
constructor({
parent = "",
height = 240,
title = '', subtitle = '',
data = {},
format_lambdas = {},
summary = [],
@ -17,7 +15,10 @@ export default class BaseChart {
is_navigable = 0,
has_legend = 0,
type = '' // eslint-disable-line no-unused-vars
type = '', // eslint-disable-line no-unused-vars
parent,
data
}) {
this.raw_chart_args = arguments[0];
@ -81,6 +82,10 @@ export default class BaseChart {
}
setup() {
if(!this.parent) {
console.error("No parent element to render on was provided.");
return;
}
this.bind_window_events();
this.refresh(true);
}