Skip to content

Conversation

@arteria32
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui
Copy link

gravity-ui bot commented Nov 5, 2025

Visual Tests Report is ready.

@arteria32 arteria32 changed the title Feat: Add Null Handling [wip] Feat: Add Null Handling Nov 5, 2025
@arteria32
Copy link
Contributor Author

Hi, @korvin89, @kuzmadom
I prepared a first draft for null handling for all chart types (imho, for each type that it is relevant). Can you see my implementation, review, or discuss the desired feature state?

@arteria32 arteria32 marked this pull request as ready for review November 5, 2025 13:06
@korvin89
Copy link
Collaborator

korvin89 commented Nov 6, 2025

@arteria32 Hey! First of all - thank you for contribution!

We have discussed your PR with @kuzmadom and wanna ask you to make some corrections:

  1. Rename nullHandling in this way:
type SomeSeries = {
  // ...
  **
   * @property nullMode - How to handle null/undefined values
   * - 'skip': omit the data point (creates gap in line, no bar shown)
   * - 'zero': treat as zero value
   * - 'connect': connect points across null (line/area only)
   */
  nullMode: 'skip' | 'zero' | 'connect'
  // ...
};
  1. Fix 2 failing tests
  2. Fix bar-x story, it's very difficult to see the changes right now
  3. Fix scatter story, now something is going wrong there because the beginning of the countdown for unix time appears
  4. Move data for stories to __data__
  5. Add tests for all cases you added stories for

@korvin89 korvin89 changed the title [wip] Feat: Add Null Handling feat: add nullMode for area, bar-x, bar-y, heatmap, line, pie, scatter, waterfall charts Nov 6, 2025
@arteria32 arteria32 marked this pull request as draft November 7, 2025 12:26
@arteria32
Copy link
Contributor Author

  • Fix 2 failing tests

done

*Fix bar-x story, it's very difficult to see the changes right now

I have simplified all the stories for the null mode demo.

Fix scatter story, now something is going wrong there because the beginning of the countdown for unix time appears

I have forbidden null values for datetime axes in the validation function. I believe that zero replacement or skipping mode is not suitable for this type.

Move data for stories to data

Done

Add tests for all cases you added stories for
Done

@arteria32 arteria32 marked this pull request as ready for review November 7, 2025 20:41
@korvin89 korvin89 merged commit 06547bb into gravity-ui:main Nov 12, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants