Daveiano/weewx-wdc

Change legend position

linde15 opened this issue · 2 comments

The legend of D3 charts is currently being displayed in the upper right corner of a chart. For my use case, it's covering the most recent data.

I'd like to be able to define a different legend position, either within the chart area or outside the chart area (but still inside the tile area).

image

Yes, that's right, the legend position should be configurable.

I will see what I can do about positioning the legend outside the chart area. This will be included in the next release, please be patient!

I added a new property for configuring the charts: legendPosition:

One of "top right", "top left", "bottom right", "bottom left", "top" or "bottom". Default is "top right". "Top" and "bottom" will show the legend outside of the chart.

From left to right: "top", "bottom" and "top left" legend position:

Legends

This will be included in the next release, v3.5.0 - so please stay tuned! ;)