vue-chart | A Powerful and Highspeed Chart Parser for Vue1.X.X | File Utils library
kandi X-RAY | vue-chart Summary
kandi X-RAY | vue-chart Summary
A Powerful and Highspeed Chart Parser for Vue1.X.X & Vue2.X.X
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vue-chart
vue-chart Key Features
vue-chart Examples and Code Snippets
Community Discussions
Trending Discussions on vue-chart
QUESTION
I am currently making a reports page and currently struggling how to render the dataset to my BarChart. I have no problems showing static data to the chart but when I use axios it does not work. I read solutions about using watchers and mounted. But I am confused how to apply it if my BarChart is in another component.
This is my BarChart Code:
...ANSWER
Answered 2021-Jun-14 at 02:59Use watch
inside your BarChart
component as below:
QUESTION
I have a Nuxt/Vue app with a page displaying a chart. This page also contains
- a modal component that allows users to create a new data point
- a dropdown menu that allows users to select how many days of data do they want the chart to display.
I would like to achieve the following:
- Refresh the page (call my API again) after creating a new data entry
- Refresh the page when the user chooses a different dropdown value
The main problem I'm facing now is that the barchart disappears a few seconds after I close the data entry modal and I can see the following error in the console: Error: [vuex] do not mutate vuex store state outside mutation handlers.
.
Additionally, I cannot seem to trigger an update by changing the dropdown value, but that is my secondary problem.
Since this example involves an external API, it is difficult to come up with a reproducible example, but here is what my setup looks like:
...ANSWER
Answered 2021-May-29 at 21:33Regarding the chart updates:
When the data point is added in the modal, emit a custom event to the parent component, that will call getData.
QUESTION
Good day to all:
Recently I have started working with Vue.js(2.6.12) + Vuetify(2.3.10) and Chart.js(3.0.2). So I'm a newbie (again).
I have created a componenent which wraps the Bar chart that Chart.js allows us to create. Here it's a picture of it:
The only two things that I want to change are the little box that comes near to the legend title and some grid x lines.
In the case of the little legend box is red. I would like that It's aligned with the blue color of the legend title text. As I show you in this picture:
Finally I want to include some color (pink) in the X axis:
I'm unable to achieve this. I have regarded and follow the official documentation and nothing works :S.
- Create the function for painting some axis in colors: https://www.chartjs.org/docs/3.0.2/samples/scale-options/grid.html
- Change the colors of the legend: https://www.chartjs.org/docs/3.0.2/configuration/legend.html#legend-label-configuration
In the case of the legend title box I have noticed that always takes the color of the first element. In the case of the axis, the function supported by chart.js doesn't work for me. It doesn't print me the x axis at all.
Things that I have tried:
- Upgrade to chart.js 3.3.0 but I got an error like this: "" The reason I was using 3.0.2 it's because it's the only version which is working to me from the 3.0.0 versions.
- Downgrade to 2.9.3/4. I wasn't able to change the color of the box or the axis lines, but the rest worked fine.
- Use a wrapper: https://vue-chartjs.org/. It didn't work
Code of the whole component:
...ANSWER
Answered 2021-May-26 at 14:48To customize the legend box color you will need to use a custom HTML legend, there you can specify it with CSS, for the pink grid lines you can use the scriptable options. For both see example:
QUESTION
MyChart.vue
...ANSWER
Answered 2021-May-07 at 07:22First, update your chart.js
version to 2. You can do this by executing the following command.
QUESTION
ANSWER
Answered 2021-May-04 at 00:05If you dont register it globally but only locally in the plugins array it will only activate for that chart
Example (only the first chart will have labels):
QUESTION
ANSWER
Answered 2021-Apr-27 at 17:59You will have to put the display false in the tick
sub config in the scale
config like so:
QUESTION
ANSWER
Answered 2021-Apr-04 at 12:16Chart.js has a new release version with 3.0.x. I think, vue-chartjs
does not support it yet.
You can downgrade chart.js and try again.
ChartJS [3.0.1 - Published 2 days ago] https://www.npmjs.com/package/chart.js?activeTab=readme
And there is a vue-chartjs
issue about 22 hours ago.
https://github.com/apertureless/vue-chartjs/issues/695
QUESTION
I created a Vue.js project with vue-chartjs. I tried reinstalling the library, however I still got this error:
...ANSWER
Answered 2021-Apr-17 at 10:25High chance you installed chartjs version 3. The vue wrapper is incompatibele with this version of chart.js and only supports the older version 2.
If you downgrade to version 2.9.4 by changing the version number in your package.json to 2.9.4 and run your install command again or remove the package and use the command install chart.js@2.9.4
. This will most likely resolve your issue
QUESTION
i am trying to plot a line graph using vue-chartjs and Chart.js (2.7.1). the graph is displayed, but there are no xAxes and yAxes labels.
This is my options object:
...ANSWER
Answered 2021-Apr-13 at 08:29In Chartjs 2.x.x version, you have to specify scales options in an array not an object.
Try like this
QUESTION
working on a covid app to get familiar with vue2js.
Am now trying to get a graph with vue-chartjs but am failing to pass the data to the graph/chart component.
I make an API request with vuex and passing the data to my component: CountryGraph.vue which contains a Graph.vue with the chart itself.
vuex -> CountryGraph.vue -> Graph.vue
Passing data into CountryGraph.vue works:
But when I try to pass my data (countryGraph
) as props to my char/Graph.vue component, then it is not done and I get in Graph.vue only the value undefined
:
Why?
Below my code, first the CountryGraph.vue:
...ANSWER
Answered 2021-Mar-16 at 22:22A couple issues to note:
It looks like you're mapping a nonexisting property (
el.data
should beel.date
). Possibly just a typo in the question.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vue-chart
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page