Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart upgrades and spacing improvements #2965

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open

Conversation

hughess
Copy link
Member

@hughess hughess commented Jan 2, 2025

Description

  • Echarts upgrade to 5.6.0
  • Axis label tooltip for truncated labels
  • Datazoom echarts theme adjustments to include handles
  • Echarts grid adjustments
  • Move padding and margin settings to parent chart container
  • Add leftPadding and rightPadding props to charts for full control of label cutoff
  • x label fixes
    • All x-labels now show by default on string x-axes
    • Truncate when labels overflow, with tooltip to show column name on hover
    • Option to wrap using xLabelWrap

Examples

Spacing

Before

CleanShot 2025-01-02 at 18 16 13@2x

After

CleanShot 2025-01-02 at 18 11 32@2x

X Axis Labels

Before

CleanShot 2025-01-02 at 18 18 23@2x

After - truncate (Default)

CleanShot 2025-01-02 at 18 09 59

After - wrap (xLabelWrap=true)

CleanShot 2025-01-02 at 18 09 29@2x

DataZoom (via echartsOptions)

     <LineChart 
            data={orders_by_month}
            x=month
            y=sales_usd0k 
            yAxisTitle="Sales per Month"
            echartsOptions={{
                dataZoom: {
                    show: true,
                    bottom: 10
                },
                grid: {
                    bottom: 50
                }
            }}
        />

Before

CleanShot 2025-01-02 at 18 21 49@2x

After

CleanShot 2025-01-02 at 18 22 59@2x

Checklist

  • For UI or styling changes, I have added a screenshot or gif showing before & after
  • I have added a changeset
  • I have added to the docs where applicable

@ItsMeBrianD ItsMeBrianD self-requested a review January 3, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant