I'm using VictoryCharts, specifically the VictoryLegend
component to render the legend for my chart. According to the docs it sounds like the only options for positioning the legend are absolute x
and y
coordinates. I'm trying to position the legend relatively, for example "at the bottom in the middle". This is the desired appearance:
Because the series labels in my legend are internationalized, the number of characters and thus the legend's width changes based on locale, so it isn't an option to hard-code an x
coordinate to center the legend. I would also prefer not to have to calculate the y
coordinate based on the height of my chart. Is there any way to relatively position the VictoryLegend
below the chart and horizontally centered?