vuejs2: strange chart look
See original GitHub issueTrying render chart billboard.js at vue.js2
package.json:
“billboard.js”: “^1.2.0”,
“vue”: “^2.2.2”,
import: import {bb} from 'billboard.js'
Generate chart:
var chartbb = bb.generate({
bindto: '#bbChart',
data: {
columns: [
['data3', 300, 200, 160, 400, 250, 250]
],
type: 'spline'
}
})
setTimeout(function () {
chartbb.load({
columns: [
['data7', -130, -150, -200, -300, -200, -100]
]
})
}, 2000)
insert into code.vue: <div id="bbChart" ></div>
And get this:
Seems to that library it’s not correct import…
There are no proper styling chart, axes, series.
Steps to check or reproduce
Any suggestions what I’m doing wrong? Maybe should import style.css? But how?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Computed property as reactiveprop to vue-chartjs?
We'd need to see the chart options to see if it's the same underlying cause. Your axes options should look something like this:...
Read more >Building Table Sorting and Pagination in Vue.js
Building Table Sorting and Pagination in Vue.js ... I've got a table with four columns: Name, Age, Breed, and Gender. And then I...
Read more >Watchers | Vue.js
Watchers declared using the watch option or the $watch() instance method are automatically stopped when the owner component is unmounted, so in most...
Read more >Charting with Vue: A comparison - LogRocket Blog
I'm curious how much each chart solution will make me change my data to ... time in Chart.js by itself first before looking...
Read more >Using Slots In Vue.js - Smashing Magazine
Let's take a look at how to use slots and some examples of how they can be used in your Vue applications. ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I often find that this is the case with packages that have css as part of the project. For these cases I include a scss file as part of my main project in webpack and do my imports there so they are globally scoped.
For example:
My webpack.config.js looks something like this:
And in my main.scss file: (note that ~ resolves to the node_modules directory)
I added this into
<style>...</style>
section of my App.vue file:@import "billboard.js/dist/billboard.min.css";
It works.