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

For small data value, bar.radius draws surpassing and mislead correct value #3903

Closed
netil opened this issue Oct 22, 2024 · 0 comments
Closed
Assignees
Labels

Comments

@netil
Copy link
Member

netil commented Oct 22, 2024

Description

In a condition where bar.radius option is enabled, for small data values, bar shapes renders out of the scale.
image

Above screenshot, is displaying negative value, but the shape mislead to be understood as positive value.

This happens, because of the representation of radius. For radius needs minimal angle space, but if the data is in small scale, it goes out surpassing.

image

It needs to remove those out of range area.

Steps to check or reproduce

bb.generate({
	size: {
		height: 199
	},
	axis: {
		x:{
			"tick":{
				"show":false,
				"outer":false
			}
		},
		y: {
			"min":-50000000000,
			"max":50000000000,
			"tick":{
				"show":false,
				"outer":false,
				"text":{
					"position":{
						"x":-20
					}
				},
				"stepSize":25000000000
			},"padding":0
		}
	},
	bar: {
		radius: 2,
		width: 10,
		padding: 2
	},
	data: {
		type: "bar",
		columns:[
			["data",-10289158423, -204482173,3075954443]
		]
	},
	grid: {
		"y":{"show":true}
	},
	padding: {
		top: 5,
		left: 71
	},
	legend: {
		show: false
	},
	tooltip: {
		show: false
	}
});
@netil netil added the bug label Oct 22, 2024
@netil netil self-assigned this Oct 22, 2024
netil pushed a commit to netil/billboard.js that referenced this issue Oct 22, 2024
clip surpassing shape area to mitigate visualization of value

Ref naver#3903
@netil netil closed this as completed in 91b5dca Oct 22, 2024
github-actions bot pushed a commit that referenced this issue Oct 22, 2024
# [3.14.0-next.3](3.14.0-next.2...3.14.0-next.3) (2024-10-22)

### Bug Fixes

* **bar:** fix representation of radius for small data ([91b5dca](91b5dca)), closes [#3903](#3903)
netil pushed a commit to netil/billboard.js that referenced this issue Oct 23, 2024
clip-path style should be updated according the data toggles

Ref naver#3903
netil pushed a commit that referenced this issue Oct 23, 2024
clip-path style should be updated according the data toggles

Ref #3903
netil added a commit that referenced this issue Oct 23, 2024
clip-path style should be updated according the data toggles

Ref #3903
github-actions bot pushed a commit that referenced this issue Oct 25, 2024
# [3.14.0](3.13.0...3.14.0) (2024-10-25)

### Bug Fixes

* **axis:** fix error when showing tick only ([705947f](705947f)), closes [#3881](#3881)
* **bar:** fix representation of radius for small data ([91b5dca](91b5dca)), closes [#3903](#3903)
* **event:** Fix interaction with viewBox ([243bf3c](243bf3c)), closes [#3414](#3414)
* **input:** Fix touch/mouse input detection ([3d4392a](3d4392a)), closes [#3854](#3854)
* **point:** fix sensitivity error when blank area is clicked ([0060786](0060786)), closes [#3900](#3900)
* **scale:** Fix non-shape's element positioned accurately ([216141b](216141b)), closes [#3907](#3907)
* **size:** Fix legend overflows with padding fit mode ([8357d11](8357d11)), closes [#3872](#3872)
* **zoom:** Fix unzoom after dynamic data load ([385907e](385907e)), closes [#3878](#3878)
* **zoom:** Prevent error for out of range ([6f69e97](6f69e97)), closes [#3895](#3895)

### Features

* **axis:** Intent to ship axis.evalTextSize ([87048e9](87048e9)), closes [#3889](#3889)
* **interaction:** Intent to ship interaction.onout ([9c668e6](9c668e6)), closes [#3887](#3887)
* **legend:** Pass visibility state to legend item's event callback ([ba71911](ba71911)), closes [#3897](#3897)
* **render:** Add forced init option on lazy rendering  ([218ce46](218ce46)), closes [#3106](#3106)
* **resize:** Intent to ship resize.auto='viewBox' ([db21387](db21387)), closes [#3893](#3893)
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

1 participant