amcharts3 icon indicating copy to clipboard operation
amcharts3 copied to clipboard

Supporting Vue.js

Open wushan opened this issue 7 years ago • 27 comments

Is there any chance that releasing a amcharts component for vue.js ? Since Angular and React have one.

wushan avatar Apr 12 '17 08:04 wushan

@wushan We'll consider it. However, nobody on the AmCharts team uses Vue, so we'll have a hard time supporting it.

Pauan avatar Apr 18 '17 06:04 Pauan

Any update on this?

craigcampbell avatar Aug 09 '17 16:08 craigcampbell

No, not yet. There are no immediate plans for Vue.js support, I'm afraid.

martynasma avatar Aug 10 '17 11:08 martynasma

+1 for Vue support.

Vue currently has 63k+ stars on github and is just about as popular as React and Angular (which you support)

abelovic avatar Aug 11 '17 18:08 abelovic

@abelovic I hear you. We are a small team, though, and can't possibly support everything. Vue is on our radar. Even if we don't have immediate plans or resources to implement the support, we might come back to it in the future.

I hope you find this reasonable.

martynasma avatar Aug 11 '17 19:08 martynasma

Still hoping this will happen one day.

jgn-epp avatar Sep 12 '17 13:09 jgn-epp

I want this.

vsg24 avatar Sep 13 '17 08:09 vsg24

+1

deemaxx avatar Sep 26 '17 22:09 deemaxx

+1

ropinheiro avatar Sep 28 '17 10:09 ropinheiro

What do you use in the alternative amcharts, for vuejs?

mitrm avatar Sep 28 '17 18:09 mitrm

I still use amcharts and use watchers to call update functions.

jgn-epp avatar Sep 29 '17 06:09 jgn-epp

+1

LobsterMan avatar Oct 02 '17 12:10 LobsterMan

+1

u-Azathoth avatar Oct 04 '17 14:10 u-Azathoth

We've just published a tutorial on using amCharts with Vue.js:

https://www.amcharts.com/kbase/using-amcharts-vue-js-webpack/

I know it's not exactly the same as native component, but still might help someone.

martynasma avatar Oct 09 '17 12:10 martynasma

@martynasma thanks for the tutorial, but please don't put vue out of your sights. :)

bragma avatar Oct 17 '17 09:10 bragma

@bragma Noted ;)

martynasma avatar Oct 17 '17 10:10 martynasma

And please don't forget to place it in https://github.com/vuejs/awesome-vue#charts

peluprvi avatar Dec 03 '17 23:12 peluprvi

When I try create a chart by the tutorial, I get some error like this:

TypeError: r.a.makeChart is not a function

romakov avatar Feb 09 '18 14:02 romakov

@martynasma I am receiving TypeError: __WEBPACK_IMPORTED_MODULE_1_amcharts3___default.a.makeChart is not a function.

ekamgit avatar Feb 11 '18 11:02 ekamgit

@romakov @ekamgit are you just following the tutorial or do you get the error in your own/some more elaborate setup? If the latter, would it be possible for you to share some code so we can investigate?

ailon avatar Feb 12 '18 07:02 ailon

<div id="chartdiv" style="width: 100%; height: 400px;">`

<script>
import AmCharts from 'amcharts3'
import AmSerial from 'amcharts3/amcharts/serial'

export default {
  name: 'app',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  created () {
    AmCharts.makeChart("chartdiv",
      {
        "type": "serial",
        "categoryField": "type",
        "chartCursor": {},
        "graphs": [
          {
            "type": "column",
            "title": "Pizza types",
            "valueField": "sold",
            "fillAlphas": 0.8
          }
        ],

        "dataProvider": [
          { "type": "Margherita", "sold": 120 },
          { "type": "Funghi", "sold": 82 },
          { "type": "Capricciosa", "sold": 78 },
          { "type": "Quattro Stagioni", "sold": 71 }
        ]
      }
    );
  }
}
</script>

I make component by your guide, but AmCharts is empty object without a 'makeChart' method

romakov avatar Feb 13 '18 14:02 romakov

@romakov Looks like amCharts package is missing in your project. Are you sure you've installed it from npm?

npm install amcharts/amcharts3 --save

ailon avatar Feb 14 '18 19:02 ailon

@ailon Yes, I did it many times, but I still get the same error. Let's try do it step by step

romakov avatar Feb 15 '18 11:02 romakov

@romakov Try to place it inside a this.$nextTick(() => { /* AmCharts.makeChart here */ }). That is the majority difference between your setup and mine. The other thing is that I imported AmChart in my main.js, but I don't think this is the case. In my package.json it is in dependencies as "amcharts3": "github:amcharts/amcharts3"

peluprvi avatar Feb 15 '18 23:02 peluprvi

@abelovic try to change import AmCharts from 'amcharts3' import AmSerial from 'amcharts3/amcharts/serial' to import 'amcharts3' import 'amcharts3/amcharts/serial'

and then use window.AmCharts.makeChart(...

@martynasma Do u really tried the tutorial? The amcharts3 library doesn't support import/module method. The js file only place AmCharts in global(window) scope.

quillhon avatar Mar 02 '18 04:03 quillhon

@quillhon No, I didn't. It was written, verified and reverified by my colleague @ailon. I'm going to leave it here, since I'm not competent to comment on the topic. If you elaborate what you are trying to do, maybe someone in this thread will be able to figure out why it's not working.

martynasma avatar Mar 02 '18 06:03 martynasma

@martynasma

  1. Frustrating that the documentation on your site suggests that amCharts does come with Vue support. At the very least you could update your documentation to inform the world of the true situation.
  2. I understand that you're close to a v4 release of amCharts, so you're probably prioritising that at the moment. Nevertheless, and ETA would be much appreciated. I would "really" like to use amCharts on my Vue development projects, but without this kind of support may have to find an alternative.

cartbeforehorse avatar Jun 22 '18 00:06 cartbeforehorse