vue-funnel-graph-js icon indicating copy to clipboard operation
vue-funnel-graph-js copied to clipboard

Full width

Open Gapz opened this issue 5 years ago • 2 comments

Is there an easy way to implement full width? Fixed width is not an option in this day and age.

Thank you for the great plugin!

Gapz avatar Aug 12 '19 14:08 Gapz

@greghub Hi Greg, any progress with this?

Gapz avatar Sep 03 '19 12:09 Gapz

If anyone is looking for a temporary fix until this feature is implemented, here's how I've implemented it atm:

Add a ref-Attribute to the wrapping element:

<div ref="funnel-graph-wrapper">
    <funnel-graph :width="graphWidth" ... />
</div>

... and calculate the width using a computed property:

computed: {
    graphWidth() {
        return this.$refs['funnel-graph-wrapper'].offsetWidth;
    },
}

quodos avatar Apr 02 '20 07:04 quodos