React-vis: Move axis title outside chart

Created on 18 Jul 2018  路  5Comments  路  Source: uber/react-vis

Currently the axis titles are drawn inside the chart like in the following example:
screen shot 2018-07-18 at 09 40 35

I don't see a way to move the axis title outside the chart like in this chart:
screen shot 2018-07-18 at 09 42 58

Is there anything I can do to move/translate the axis title outside the chart?

enhancement

Most helpful comment

There's been some questions about this type of thing before #542. I've been thinking that the API for the axis title is kinda overloaded (eg there a bunch of tags to place the label in various positions), and maybe we should introduce a new component something like

  • accept a percentage or tag word (bottom-middle, top-left)
  • and an orientation.
  • It would probably be html component rather than an svg, (though it could probably be pretty easily implemented as both)
  • For generality could make the label inside of the axes component use it

It would allow users to put titles on their chair in general, and just provide more options for annotations.

Thoughts?

All 5 comments

There's been some questions about this type of thing before #542. I've been thinking that the API for the axis title is kinda overloaded (eg there a bunch of tags to place the label in various positions), and maybe we should introduce a new component something like

  • accept a percentage or tag word (bottom-middle, top-left)
  • and an orientation.
  • It would probably be html component rather than an svg, (though it could probably be pretty easily implemented as both)
  • For generality could make the label inside of the axes component use it

It would allow users to put titles on their chair in general, and just provide more options for annotations.

Thoughts?

Would strongly welcome this change also. Any advancements on this?

I ended up implementing a ChartLabel component, I'll put out a PR for it sometime later today. It has roughly the features I described above!

Sounds good, cheers Andrew!

Now available!! Resolving

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cang-afero picture cang-afero  路  4Comments

martoncsikos picture martoncsikos  路  4Comments

jckr picture jckr  路  5Comments

zavrick picture zavrick  路  4Comments

Falieson picture Falieson  路  3Comments