Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

BitChart draws its crosshair and axis chip under the hovered bar instead of the hovered category

Chiusa
#14,043 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #14045 di @Mohammadzarei754 — chiusa senza merge
  • #14060 di @msynk — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp, wasm
Ambito
frontend

Direzione di ricerca

Start in Components/Chart/BitChart.razor.cs, at BitChart.BuildHover, and trace how it chooses positions from the hovered element versus the active category group. Reproduce with a grouped bar chart using default interaction and then Index mode. Done when the crosshair and axis chip stay centered on the category as the pointer moves between its bars.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

In a bar chart with more than one dataset (grouped bars), the crosshair line and the crosshair label (the chip on the index axis) are drawn at the center of one bar of the group, not at the center of its category: with the default Nearest interaction, hovering the empty part of a category (its hit band) puts them at the category's first bar; with an Index interaction, hovering a bar puts them at the hovered bar.

So the chip lands beside the axis's own tick label of that category instead of over it, and the category's name reads as written twice under the axis (e.g. Mon 19 under the first bar of the group and again under the middle of the group). With an Index interaction, moving the pointer from one bar of the group to the next moves the line and the chip, although the active category (and the tooltip, which the Average positioner already centers on the group) stays the same.

Cause

BitChart.BuildHover (Components/Chart/BitChart.razor.cs) positions both from the hovered element e (e.CenterX / e.CenterY), while in an index-style interaction the whole category is active (group, the elements of e.DataIndex); for a hit band e is RepresentativeOf(band), the category's first element.

Steps to reproduce
  1. A BitChart of BitChartType.Bar with three datasets and a few category labels, default options.
  2. Hover the empty space between two bars of a category: the dashed crosshair and the chip sit under the category's first bar, beside its tick label.
  3. With Interaction = { Mode = BitChartInteractionMode.Index }, hover the first bar of a category, then the last one: the crosshair and the chip jump from bar to bar.
Expected behavior

The crosshair and its chip stay on the category - the middle of the group - wherever in it the pointer is, as they already do on a line chart, where all the points of an index share one x.

Version

Bit.BlazorUI.Extras 11.0.0-pre-10 (still in develop).

Lingua principale
C#
Stelle
1.4k
Fork
264
Merge medio
10h 11m
PR unite (30g)
404

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bitfoundation/bitplatform

Tutte le issue di bitfoundation/bitplatform

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.