Skip to content

Updating echarts to 5.5.1 and using common build #1280

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

Closed
wants to merge 1 commit into from
Closed

Conversation

ArneTR
Copy link
Member

@ArneTR ArneTR commented Aug 8, 2025

@ribalba
@davidkopp

Can you please if you experience any errors with these charts?

We have no visual tests to verify and furthermore echarts does not throw errors when a feature is missing suprisingly. I used the "simple" variant of the package before and then hover notes and the toolbox in the top right was missing.
This "common" version I am using is now a bit smaller than the one before and seems to have all we need.

To inject demo data into a fresh install run python3 tools/import_data.py data/demo_data.sql

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@davidkopp
Copy link
Collaborator

davidkopp commented Aug 8, 2025

I found one problem: In the comparison view the distribution graph (radar chart) is missing

image

GitHub Codespace (may be not active anymore later):
https://musical-bassoon-r5xr75j7rqfpx57-9143.app.github.dev/compare.html?ids=f6167993-260e-41db-ab72-d9c3832f211d,a416057b-235f-41d8-9fb8-9bcc70a308e7&force_mode=usage_scenarios

@davidkopp
Copy link
Collaborator

davidkopp commented Aug 8, 2025

What about using a custom build of the ECharts library and including only the actual needed components?

Claude:

For your custom ECharts build, you'll need: Bar Charts, Line Charts, Pie Charts, Radar Charts, along with Grid, Legend, Tooltip, Toolbox, DataZoom, MarkLine, MarkPoint, and MarkArea components.
The pie chart component can potentially be excluded since it's marked as unused, but I'd recommend keeping it for future compatibility.


More verbose response:

Chart Types Used:

  1. Bar Charts (type: 'bar')
    - Used in: ci.js, timeline.js, helpers/charts.js
    - For displaying energy metrics, workflow costs, and timeline data
  2. Line Charts (type: 'line')
    - Used in: stats.js, helpers/charts.js
    - For timeline visualizations, moving averages, and trend analysis
  3. Pie Charts (type: 'pie')
    - Used in: helpers/charts.js (getPieChartOptions function)
    - For energy distribution visualization (currently commented as "broken and unused")
  4. Radar Charts (type: 'radar')
    - Used in: helpers/charts.js (displayKeyMetricsRadarChart function)
    - For displaying key metrics comparisons

ECharts Components Needed for Custom Build:

Core Components:

  • Chart core (required)
  • Grid component (for chart layout)
  • Legend component (used in all charts)
  • Tooltip component (used extensively)
  • Toolbox component (for zoom/restore functionality)

Chart Types:

  • Bar chart
  • Line chart
  • Pie chart
  • Radar chart

Features:

  • DataZoom component (for zooming functionality)
  • MarkLine component (for average lines, confidence intervals)
  • MarkPoint component (for missing data indicators)
  • MarkArea component (for standard deviation visualization)
  • Brush component (might be needed for selection)

Coordinate Systems:

  • Cartesian coordinate system (for bar/line charts)
  • Polar coordinate system (for radar charts)

Additional Features:

  • Animation (disabled in most cases but component might be needed)
  • SVG Renderer or Canvas Renderer

@ArneTR ArneTR mentioned this pull request Aug 9, 2025
@ArneTR
Copy link
Member Author

ArneTR commented Aug 12, 2025

Closed as #1282 was merged in favor

@ArneTR ArneTR closed this Aug 12, 2025
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.

2 participants