Custom labels on axis

未关闭
#146 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
rust

调研方向

首先定位 PlotMemory、Plot API 以及现有的 x_axis_formatter/y_axis_formatter 处理逻辑。确定自定义标签应该公开坐标轴粗细,还是在内部实现,同时保留现有的格式设置。完成标准是能够沿 y 轴放置标签,并保持间距和格式一致。

由索引模型根据 Issue 内容生成。

描述

I wanted to put some labels on top of the y axis (similar to TradingView, see the video), but right now there is no way of getting axis thickness, so I can't make it look pretty.

https://github.com/user-attachments/assets/81480f0f-4b37-4ad5-b489-f47d952583c9

Describe the solution you'd like

Possible solutions:

  1. Expose x_axis_thickness/y_axis_thickness from PlotMemory, however it will be hard to get the same label formatting that we get from x_axis_formatter/x_axis_formatter
  2. Implement these labels internally and expose them in Plot API, but I'm not sure that anyone besides me needs them

Additional context
That's what I got with an exposed y_axis_thickness

https://github.com/user-attachments/assets/c6b347a9-6107-40ca-9d44-0d42ee13a856

主要语言
Rust
星标
494
派生
110
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

emilk/egui_plot 的其他 Issue

查看 emilk/egui_plot 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。