[Feature] Guide lines: a `shapeRendering` option for crisp hairlines
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with packages/charts-core/src/types.ts to trace ChartGuideLineStyle and SceneStyle, then read packages/charts-core/src/scene.ts and packages/charts-core/src/svg-renderer.ts to follow guide-line styles into SVG output. Use the issue’s renderChartSvg repro as the starting check. Done when the requested rendering hint is emitted for grid, axis, and guide lines, and the repro passes.
索引モデルが issue の本文から書いたものです。
説明
Version: @tanstack/charts 1.1.0 (57774e1).
ChartGuideLineStyle exposes stroke, strokeOpacity, strokeWidth, strokeDasharray and lineCap (types.ts:419-425). It has no rendering hint, and SceneStyle has none either (types.ts:1394-1404). The SVG renderer writes only those channels (svg-renderer.ts:206-216), and guideLineStyle copies only those five fields (scene.ts:1719-1735).
A 1px hairline grid on a fractional device offset is therefore anti-aliased across two rows at half intensity. Charts built on visx (whose GridRows defaults to shapeRendering="crispEdges") paint one crisp row. The only way to match that today is a CSS rule on the renderer's .ts-chart__grid line elements, which keys on a class name the docs do not promise.
Repro
import { renderChartSvg } from './svg'
// scene from any chart with a y axis grid, e.g. lineY with scales.y.grid: { strokeWidth: 1 }
expect(renderChartSvg(scene, { ariaLabel: 'c' })).toMatch(/shape-rendering="crispEdges"/)
There is no option that makes this pass; grep -ri shape-rendering packages/charts-core/src docs returns nothing.
Proposal
Add shapeRendering?: 'auto' | 'crispEdges' | 'geometricPrecision' | 'optimizeSpeed' to ChartGuideLineStyle, emitted as the SVG attribute on grid, axis and guide lines (ignored by canvas). A generic SVG presentation-attribute passthrough on guide lines would also work.
Follows #131, which added ChartGuideLineStyle. Checked against 57774e14a1a86081eddb3a23523724a40da05640 (v1.1.0).
- 主要言語
- TypeScript
- スター
- 819
- フォーク
- 49
- 平均マージ
- 4時間 58分
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/charts のほかの issue
-
[Bug] Focus guides: `url(#id)` paints ignore `idPrefix`対応中かも @getdownandcode が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TanStack/charts#211 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Printed charts keep their screen width: resize redraw waits for an animation frame対応中かも @piecyk が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
[Feature] Readable outside labels for crowded pie and donut charts対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
TanStack/charts#227 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
メンテナーはふだん 1 日以内に返信
TanStack/charts の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AvaProtocol/ava-sdk-js#276 ·
メンテナーはふだん 1 日以内に返信
-
useFragment does not require `variables` when the fragment's variables type has required fieldsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apollographql/apollo-client#13493 ·
メンテナーはふだん 1 日以内に返信
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backends対応中かも @roboomp が今日担当しました。 オープンbug prio:p2 providers triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
can1357/oh-my-pi#15798 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
code-yeongyu/oh-my-openagent#10172 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
PDFCraftTool/pdfcraft#189 ·