deviavir / vue-bar Goto Github PK
View Code? Open in Web Editor NEWSimple, elegant spark bars for Vue.js
Home Page: https://deviavir.github.io/vue-bar/
License: MIT License
Simple, elegant spark bars for Vue.js
Home Page: https://deviavir.github.io/vue-bar/
License: MIT License
I can't set solid color in bars. it's interesting
The last few pull requests:
Did not include README changes to their pull requests to add the new features / props in the API docs.
(Adding issues so I may tackle them myself, for reference)
Related to #23
Hi,
should be possibile to add negative bars?
Thank you
Would it be possible to accept a prop to change the font size? On a graph with multiple labels, the text gets cut off on the sides because it's too big.
Awesome project!
How do I display a custom tooltip when I hover over a bar?
Thanks!
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
Using expressVue so unable to pass this to Vue.use. That being said not entirely sure that this shouldn't work using the import alone. Wondering if there is something in the files that could be causing conflict or if there might be a way to install this using expressVue and serverside rendering.
From
vue-bar/src/components/bars.js
Line 63 in 39fc778
h(Path, {
Thanks.
Hello,
Thanks for creating this simple bar chart.
Does this will work with vue 3?
In the dependencies is "vue": "^2.5.21"
Within the documentation for labels there is no mention of the available props you can change, such as :labelRotate and :labelColor without having to look into the code. I believe the documentation for labels should be updated.
On the website: https://deviavir.github.io/vue-bar/ the bars load vertically, from bottom (0), to top of the value range (say, 12).
However in practice: https://jsfiddle.net/1bvxyjhk/ (example in README)
The bars load vertically as expected, but from top to bottom (which seems a bit more awkward).
This seems to happen in 1.5.0 but not earlier versions.
Some possible solutions:
Unlike Vue-trend, vue-bar does not rebuilt its own SVG after data that's been feeding this svg has changed.
Here's my example:
<template>
<div class="row">
<div class="col-12">
<button class="btn btn-future" @click="refresh">Refresh</button>
<hr>
<bars
:data="bars"
:gradient="['#6fa8dc', '#42b983']"
:barWidth="2" :rounding="1">
</bars>
</div>
</div>
</template>
<script>
import _ from 'lodash'
export default {
data() {
return {
bars: [],
trends: []
}
},
created() {
this.randomArray();
},
methods: {
randomArray() {
this.bars = _.times(100, _.random.bind(30, 10000));
this.trends = _.times(100, _.random.bind(30, 10000));
},
refresh() {
this.randomArray();
}
}
}
</script>
When I made the update for the labels, I pretty much only did enough for my own needs. However that update was not backwards compatible and will break existing implementations.
My plan is to make the x-axis labels an optional parameter passed in as an array of text. This issue will serve to also let others know I am working on this if your build breaks in the meantime, update your packages.json for version 0.1.3
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
Labels either below or on the individual bar.
Like "statistics" here:
https://dribbble.com/shots/3528275-Dashboard-UI/attachments/782647
<!-- Expected showing 15 columns -->
<bars
:data="[1, 2, -5, 9, 5, 10, 3, 5, 5, 12, 1, 8, 2, 9, 14]"
:gradient="['#6fa8dc', '#42b983']"
:barWidth="5"
:growDuration="1">
</bars>
<!-- it's working fine as I expected -->
<!-- Expected showing 2 columns -->
<bars
:data="[1, 2]"
:gradient="['#6fa8dc', '#42b983']"
:barWidth="100"
:growDuration="1"
>
</bars>
<!-- It's not working properly as I expected -->
Attached the image below.
I believe I am explaining properly now and want to resolve this issue asap.
If all values are zero would expect either a blank chart OR more preferable a chart with a tiny dash for each bar
Hi!
Would you accept a prop that would flip the bars to be rendered horizontally (instead of vertically)?
All naming suggestions are also welcome (since flip
might not be that obvious).
Best,
andreas
em
as a unit of measurement is a less modern "font size" unit of measurement. Many frameworks (such as the 4.0.0 bootstrap) try to use "rem" (root em) instead, which does a proportional size compared to a single root size (for use in scaling the UI of an app, usually in @media queries). Other applications might use em, or pt, or any other measurement.
I think an apt change would be to:
As with the other issue, might try and tackle this myself, making issue for reference.
Also, I'm not sure if this is a bug, but "labelSize" PR seemed to only edit files in dist/
not the files in src/
but I'm not sure if that is intentional or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.