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

[Bug] openinula-vchart ignores data prop when spec is provided

Aperta
#4,657 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@dyk1454683243-sudo ci sta già lavorando.

Dal 20/9/2026.

  • #4694 di @dyk1454683243-sudo — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

Inizia dai percorsi BaseChart e parseSpec del wrapper OpenInula, quindi confrontali con la gestione dei dati forniti e di updateFullDataSync nel wrapper React. Aggiungi una copertura mirata per la creazione iniziale con spec e data e per gli aggiornamenti in cui spec non cambia e viene aggiornato solo data. Il lavoro è completato quando entrambi i casi aggiornano il grafico renderizzato con il nuovo dataset.

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

Descrizione

Version

@visactor/openinula-vchart on develop at 0750d74cd6ea734e66897876506c78ca12680676

Link to Minimal Reproduction

Render <VChart spec={stableSpec} data={firstData} />, then re-render it with the same spec object and a different data value.

Steps to Reproduce
  1. Create an OpenInula VChart with both the documented spec and data props.
  2. Keep spec unchanged.
  3. Replace data with a new dataset and re-render.
Current Behavior

BaseChart enters the hasSpec branch and compares only eventsBinded.current.spec with props.spec. Because the spec is unchanged, the effect returns without updating the chart. parseSpec also does not merge the separate data prop into spec, so the data prop is ignored on initial creation as well.

Expected Behavior

The OpenInula wrapper should honor its declared data prop with a supplied spec, both initially and on data-only updates.

Environment
  • OS: Windows 11
  • Node.js: 20.20.2 and 24.14.1
  • Package: @visactor/openinula-vchart
Any additional comments?

The React wrapper already implements the intended behavior: it merges data into a supplied spec and calls updateFullDataSync when only data changes. That support was added in commit d69cb49fb for #2443, but the equivalent logic is absent from the OpenInula wrapper. The OpenInula package currently has no focused tests for this lifecycle path, so a port should add coverage for both initial and data-only updates.

I searched open and closed issues and pull requests for OpenInula data updates, hasSpec, BaseChart, and updateFullDataSync; I reviewed #2443 and both wrappers' histories. #2443 is specifically about react-vchart and its fix did not update openinula-vchart. The repository has no Discussions, and I found no existing OpenInula report or fix.

Lingua principale
TypeScript
Stelle
1.9k
Fork
221
Merge medio
2g 1h
PR unite (30g)
17

Preparare l'ambiente

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 VisActor/VChart

Tutte le issue di VisActor/VChart

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.