Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Grid and axis lines have no `shape-rendering` option, so hairlines anti-alias across two device rows

Abierto
#199 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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 '../src/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).

Lenguaje dominante
TypeScript
Estrellas
819
Forks
49
Merge medio
12 h 9 min
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TanStack/charts

Todos los issues de TanStack/charts

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.