Skip to content

bar/line chart spacing #2122

@judell

Description

@judell

See these variations on the multiseries chart in tutorial-05

1 Too much space above top datapoint:

Image
        <LineChart
          data="{ monthlyStatus }"
          yKeys="{['paid_revenue', 'sent_revenue']}"
          xKey="month"
          stacked="true"
          showLegend="true"
          tickFormatter="{(value) => {
            return window.formatMonth(value);
          }}"
        />

2 Too much space to the right of longest bar:

Image
        <BarChart
          data="{ monthlyStatus }"
          yKeys="{['paid_revenue', 'sent_revenue']}"
          xKey="month"
          stacked="true"
          showLegend="true"
          tickFormatter="{(value) => {
            return window.formatMonth(value);
          }}"
        />

3 No space above highest bar.

Image
<BarChart
          orientation="horizontal"
          data="{ monthlyStatus }"
          yKeys="{['paid_revenue', 'sent_revenue']}"
          xKey="month"
          stacked="true"
          showLegend="true"
          tickFormatter="{(value) => {
            return window.formatMonth(value);
          }}"
        />

I think this is because our XMLUI wrappers don’t expose or apply yDomain / xDomain from Recharts.

(Separately in case 3 I think horizontal is wrong, I would expect vertical)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions