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

Replace Observable Plot with ECharts #115

Closed
wants to merge 1 commit into from
Closed

Replace Observable Plot with ECharts #115

wants to merge 1 commit into from

Conversation

stritt
Copy link
Member

@stritt stritt commented Oct 11, 2024

Summary:

Move our charting library from Observable Plot to ECharts to provide a better, more responsive experience for our users.

ECharts offers robust features that align with our needs:

  • Responsiveness: Charts now adjust easilly to different screen sizes, ensuring they scale gracefully without overlapping labels or ticks.
  • Dynamic Label Handling: Labels truncate or adjust intervals based on screen width to maintain readability.
  • Theming Support: Added in chart-level light and dark modes, along with multiple color themes like Mercury, Iridium, Celestial, Cobalt, and Afterburn.
  • Simplify Codebase: Leveraging ECharts' built-in capabilities has allowed us to simplify our chart component code, making it more maintainable and easier to extend.

@stritt
Copy link
Member Author

stritt commented Oct 11, 2024

I still need to look into horizontal bar charts, and the composed chart component, but so far everything else seems to just work!

const number = parseFloat(`${firstRecordValue}`)
firstRecordValue = `¥${number.toLocaleString('en-US', { minimumFractionDigits: 0, maximumFractionDigits: 0 })}`
}
this.chartInstance = echarts.init(this.chartDiv, undefined, { renderer: 'svg' })
Copy link
Contributor

Choose a reason for hiding this comment

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

did you intentionally choose svg vs canvas?

@jmonster
Copy link
Contributor

jmonster commented Oct 17, 2024

I believe I've captured the spirit/gist of this PR in #116

@jmonster jmonster closed this Oct 17, 2024
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