[Lens] Make horizontal bar chart a first-class chart#47062
[Lens] Make horizontal bar chart a first-class chart#47062chrisdavies merged 6 commits intoelastic:masterfrom
Conversation
make horizontal bars a first class citizen
|
Should we remove "stacked" as a distinct type, and instead make it an attribute of the split series dimension somehow? |
💔 Build Failed |
💔 Build Failed |
wylieconlon
left a comment
There was a problem hiding this comment.
This change LGTM, except we might even be able to simplify more
|
|
||
| // if current state is using the same data, suggest same chart with different presentational configuration | ||
|
|
||
| if (seriesType !== 'line' && xValue.operation.scale === 'ordinal') { |
|
@chrisdavies It's an interesting idea to move "stacked" into the chart configuration. Biggest question is whether the chart types in the chart switcher should also include "stacked". @cchaos Worth looking into? |
|
Yes we have icons for horizontal and horizontal stacked chart types. cc @AlonaNadler |
💔 Build Failed |
💔 Build Failed |
|
I think the question about "Stacked" was actually discussed before, when we first created a Lens prototype. If I remember correctly, users were confused by having a separate checkbox. |
|
Yeah, I think just like how we currently distinguish between vertical bar and stacked vertical bar charts as completely separate types of charts, so should we consider with horizontal bars. |
@AlonaNadler proposed this originally, I think the idea is to advertise the functionality. Not super important, you are right. |
💚 Build Succeeded |



This gets rid of chart rotation in the XY chart, and adds a horizontal bar chart to the mix.
From the user's view, horizontal bar charts are a first-class chart, even though from an implementation, it's just the XY chart. This means horizontal bars can't be mixed and matched with other XY chart types. The reason we can't mix and match them is because A) it'd b weird to have vertical line charts, and B) the entire chart rotates, so we can't just say "rotate the bars, but don't rotate the lines".