Vuetify: [Bug Report] Sparkline doesn't support label-size for 'trend' type

Created on 5 Mar 2019  路  4Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 1.5.4
Vue: 2.6.8
Browsers: Chrome 72.0.3626.119
OS: Mac OS 10.14.3

Steps to reproduce

Set label-size attr for trend type to any value

Expected Behavior

Font size for labels must be changed

Actual Behavior

Font size for labels doesn't change

Reproduction Link

https://codepen.io/kerf/pen/VRmLzO

VSparkline bug

Most helpful comment

Still a bug on 2.0.0-beta.0

All 4 comments

Still a bug on 2.0.0-beta.0

code explicitly uses label-size only for bar type label generation for some reason.
trend labels inherit their size from their g element which is a hard coded 8px in the code.
can be bypassed via css.

A little workaround:

<v-sparline ref="sparkline" ...></sparkline>
mounted() {
  const textElements = this.$refs.sparkline.$el.querySelectorAll('text');
  for (const textElement of textElements) {
    textElement.style.fontSize = '8px';
  }
}

Fixed in #7642

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cawa-93 picture cawa-93  路  3Comments

alterhu2020 picture alterhu2020  路  3Comments

smousa picture smousa  路  3Comments

gluons picture gluons  路  3Comments

sebastianmacias picture sebastianmacias  路  3Comments