QingWei-Li / laue

🖖📈 Modern charts for Vue 2.0
https://laue.js.org
MIT License
263 stars 34 forks source link

Can a small working demo project be in the repo for newbie users to see exactly what is going where? #8

Closed zillazillazilla closed 6 years ago

zillazillazilla commented 6 years ago

I'm attempting to get the chart running in Chrome Version 68.0.3440.84 with not much luck at all.

I'm getting 'Unexpected Identifier' in Chrome Version 68 for imports/exports and transpiler wont fix it, using script type="module" only causes further issues such as 'Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".', however I feel that this may be due to me misinterpreting the setup.

A small demo project in the repo that users can download with only the minimal required html/js needed to produce the graph locally/on my server would be of great assistance. I know I must be missing something painstakingly obvious to get this running, so seeing a working setup would be great

QingWei-Li commented 6 years ago

A dead simple demo

<div id="app">
    <la-cartesian :width="300" :height="150" :data="values">
    <la-line prop="pv"></la-line>
    <la-y-axis></la-y-axis>
    <la-x-axis prop="name"></la-x-axis>
    <la-tooltip></la-tooltip>
  </la-cartesian>
</div>

<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/laue"></script>
<script>
    new Vue({
        el: '#app',
        data: () => ({
        values: [
          { name: 'Page A', pv: 2000 },
          { name: 'Page B', pv: 3000 },
          { name: 'Page C', pv: 1200 }
        ]
      })
    })
</script>
zillazillazilla commented 6 years ago

That did it, thanks. Looking forward to expanding from vue-trends to these full charts