Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting falsy type for data serie renders data serie twice when chart type is set. #3125

Closed
bj00rn opened this issue Mar 8, 2023 · 1 comment
Assignees
Labels

Comments

@bj00rn
Copy link

bj00rn commented Mar 8, 2023

Description

Setting falsy type for data serie renders data serie twice when chart type is set.

In C3 data serie type would fall back to line

Billboard behaviour
image

C3 behaviour
image

Steps to check or reproduce

// for ESM environment, need to import modules as:
// import bb, {bar, spline, line, area, step} from "billboard.js";

var chart = bb.generate({
  data: {
    type: "bar",
    columns: [
	["data1", 30, 20, 50, 40, 60, 50],
	["data2", 200, 130, 90, 240, 130, 220],
    ],
    types: {
      data2: undefined, // "", null
    },
  },
  bindto: "#combinationChart"
});
@netil netil self-assigned this Mar 14, 2023
@netil netil added the bug label Mar 14, 2023
@netil
Copy link
Member

netil commented Mar 15, 2023

@bj00rn, thanks for reporting issue.
The way handling for cases specifying falsy value for data.types will not behave same way as c3.js case.

When data.types has falsy value, then will follow the data.type value, which is "parent & general concept" for types.
So, hierarchically will have below relationship.

data.type
└-- data.types

Following this definition, from the above example, data2 type will be rendered as bar.

netil pushed a commit to netil/billboard.js that referenced this issue Mar 15, 2023
Check when falsy and non-valid chart type value is specified.

Ref naver#3125
@netil netil closed this as completed in 5eb731a Mar 15, 2023
github-actions bot pushed a commit that referenced this issue Mar 31, 2023
# [3.8.0-next.1](3.7.5...3.8.0-next.1) (2023-03-31)

### Bug Fixes

* **data:** fix break when whole dataseries are null ([#3134](#3134)) ([5d12c45](5d12c45)), closes [#3124](#3124)
* **options:** Fix handling for falsy data.types ([5eb731a](5eb731a)), closes [#3125](#3125)

### Features

* **api:** Enhance resizeAfter for .load/unload APIs ([33bbca4](33bbca4)), closes [#3157](#3157)
* **axis:** Intent to ship axis.x.inverted ([e193c0f](e193c0f)), closes [#3137](#3137)
* **module:** Support dual CJS/ESM package ([437c007](437c007)), closes [#2202](#2202)
* **padding:** Intent to ship padding='fit' ([d760a63](d760a63)), closes [#3118](#3118)
* **plugin:** Intent to ship TableView plugin ([215b611](215b611)), closes [#1873](#1873)
github-actions bot pushed a commit that referenced this issue Apr 13, 2023
# [3.8.0](3.7.5...3.8.0) (2023-04-13)

### Bug Fixes

* **data:** fix break when whole dataseries are null ([#3134](#3134)) ([5d12c45](5d12c45)), closes [#3124](#3124)
* **grid:** fix redundant <rect> appends ([1039363](1039363)), closes [#3147](#3147)
* **options:** Fix handling for falsy data.types ([5eb731a](5eb731a)), closes [#3125](#3125)
* **sparkline:** Fix to work point.focus.only option ([65b3c1c](65b3c1c)), closes [#3171](#3171)

### Features

* **api:** Enhance resizeAfter for .load/unload APIs ([33bbca4](33bbca4)), closes [#3157](#3157)
* **axis:** Intent to ship axis.x.inverted ([e193c0f](e193c0f)), closes [#3137](#3137)
* **package:** extends root div interface for styling ([0a1fe08](0a1fe08)), closes [#3162](#3162) [#3163](#3163)
* **padding:** Intent to ship padding='fit' ([d760a63](d760a63)), closes [#3118](#3118)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants