Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauge Charts #2

Closed
Bodekaer opened this issue Mar 19, 2016 · 2 comments
Closed

Gauge Charts #2

Bodekaer opened this issue Mar 19, 2016 · 2 comments

Comments

@Bodekaer
Copy link

Hi @haydenbbickerton,
Great initiative with VueCharts.

I tested it with the Gauge chart, but it throw an error: google.load is not a function
Any plans to support Gauge charts too?

@haydenbbickerton
Copy link
Owner

Thanks!

Gauge charts use the gauge package, did you pass that in using the packages prop?

Here's an example, adapted from Googles Gauge Chart example:

<vue-chart
    chart-type="Gauge"
    :packages="packages"
    :columns="columns"
    :rows="rows"
    :options="options"
></vue-chart>

And then in the Vue instance:

data: function () {
  return {
    packages: ['gauge'],
    columns: [{
      'type': 'string',
      'label': 'Label'
    }, {
      'type': 'number',
      'label': 'Value'
    }],
    rows: [
      ['Memory', 80],
      ['CPU', 55],
      ['Network', 68]
    ],
    options: {
      width: 400,
      height: 120,
      redFrom: 90,
      redTo: 100,
      yellowFrom: 75,
      yellowTo: 90,
      minorTicks: 5
    }
  }
}

@Bodekaer
Copy link
Author

Perfect! Thx so much @haydenbbickerton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants