Commit Graph

13 Commits

Author SHA1 Message Date
Jakub Juszczak
32229fbfdd Add dynamic styles and css classes as prop
You can now pass in css classes as a string for the surrounding div of the canvas and a styles object which will be applied as inline styles.
This way you can have a dynamic height with `reposnive: true`

## Example

```js
<template>
   <line-chart :styles="myStyles"/>
</template>

<script>
export default {
  data () {
    return {
          height: 100
    }
  },
  computed: {
    myStyles () {
      return {
        height: `${this.height}px`,
        position: 'relative'
      }
    }
  }
}
</script>
```
2017-07-31 21:42:48 +02:00
kutrumi
882bdd86b8 ✏️ Remove generateLegend() from initialization codes 2017-07-08 19:18:20 +09:00
Zhang Yijiang
3e423fd7ae Fix beforeDestory when renderChart was not called 2017-07-04 09:58:52 +08:00
Karl Viiburg
ef127686cd Add support for inline plugins 2017-07-03 08:12:28 +03:00
Jakub Juszczak
bb21a40506 Rewrite template option to render function 2016-12-20 14:36:35 +01:00
Jakub Juszczak
975a804570 Add chartId as prop and fix width and height props
Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
2016-09-23 13:29:03 +02:00
Jakub Juszczak
92982ef2ac Change deprecated v-el to ref
Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
2016-08-23 20:06:50 +02:00
Jakub Juszczak
012b9a82bf Change render() method name to renderChart
This way it does not conflict with the vue 2.0 render function.

Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
2016-08-23 20:01:38 +02:00
Jakub
5258ab1a0f Feature/merge options #5 (#6)
*  Add dependency lodash

*  Add helper function to merge chartOptions

* Change Charts to merge options

* And renamed options data to defaultOptions
2016-08-21 14:04:34 +02:00
Thorsten
90d9d87523 correct hook name. 2016-08-19 21:35:10 +02:00
Thorsten
998b190007 save chart instance on vm instance and add destroy() hooks to properly destroy chart when component is destroyed. 2016-08-19 21:30:39 +02:00
Jakub Juszczak
65251700d7 Add Pie Chart component 2016-07-01 19:02:41 +02:00
Jakub Juszczak
fde877e49f Refactor modules 2016-06-26 15:34:26 +02:00