Victory: Add ability to set VictoryLegend symbol size via theme propery

Created on 1 Sep 2017  路  2Comments  路  Source: FormidableLabs/victory

It looks like the size of the symbol in a VictoryLegend component is either derived from the font-size or from the symbol.size property of the datum. It would be nice if this was configurable via the VictoryTheme, as is symbol type.

Probably something as simple as:

legend: {
    style: {
      data: {
        type: 'square',
        size: 16,
      },
    },
  }

And then in victory-legend/helper-methods.js:

size: dataStyle.size || getSymbolSize(datum, fontSize),

I'd be happy to make a PR if this seems like a good approach.

Most helpful comment

@danny-andrews

Good timing. I'm actually in the middle of a big legend overhaul. I'll make sure this functionality gets in.

All 2 comments

@danny-andrews

Good timing. I'm actually in the middle of a big legend overhaul. I'll make sure this functionality gets in.

Splendid. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

esutton picture esutton  路  6Comments

devth picture devth  路  4Comments

nickzuber picture nickzuber  路  5Comments

purplecones picture purplecones  路  3Comments

robinwkurtz picture robinwkurtz  路  3Comments