Skip to content

Exception when using tension while data[ ] is empty #8676

@Quezler

Description

@Quezler

Expected Behavior

for no exception to be thrown at all.

Current Behavior

can't access property "x", point is undefined gets thrown if any of the dataset's data arrays is empty.

Possible Solution

no idea really, but for me setting the data array to [null] made the exception vanish without any noticeable side effects.

Steps to Reproduce

my apologies, but i won't be submitting an example via codepen since my brain has melted enough for now.

alternative step(s) to reproduce:

Context

for me the datasets get initialized with an empty data[] array while a background ajax request fetches the actual data and updates this afterwards, typing this i realize i might as well just not initialize that dataset until there is actual data present, but i spent like an hour trying to debug this so i'm just sharing my find here hoping it will help anyone else with their project ❤️

Environment

  • Chart.js version: ^3.0.0-rc
  • Browser name and version: firefox developer edition 87.0b9
  • Link to your project: compiled through laravel mix

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions