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

Remove space tick #1687

Closed
cantareamantisest opened this issue Sep 18, 2020 · 3 comments
Closed

Remove space tick #1687

cantareamantisest opened this issue Sep 18, 2020 · 3 comments

Comments

@cantareamantisest
Copy link

cantareamantisest commented Sep 18, 2020

Hello netil, how are you? I hope so. Is there a way to centralize the data on the x-axis according to the category, without any spacing?

code snippet

bb.generate({
        bindto: '#monitorChart',
        data: {
            x: 'x',
            columns: [
                ['x', 'OP50', 'OP100', 'OP200', 'OP300A', 'OP300B', 'OP300C', 'PROCESS1', 'PROCESS2', 'PROCESS3', 'PROCESS4'],
                ['WaitTime', 4, 4, 4, 4, 4, 4, null, null, null, null],
                ['WorkTime', 5, 10, 14, 9, 8, 11, null, null, null, null],
                ['WaitTimePerformed', 38.4, 61.2, 58.9, 62.3, 60.7, 62.7, null, null, null, null],
                ['WorkTimePerformed', 0, 22.8, 22.5, 29.1, 27.6, 29.7, null, null, null, null],
                ['TaktTime', 33, 33, 33, 33, 33, 33, 33, 33, 33, 33],
                ['PROCESS1', null, null, null, null, null, null, 33, null, null, null], 
                ['PROCESS2', null, null, null, null, null, null, null, 33, null, null], 
                ['PROCESS3', null, null, null, null, null, null, null, null, 33, null], 
                ['PROCESS4', null, null, null, null, null, null, null, null, null, null, 33]
            ],
            type: 'bar',
            order: null,
            groups: [
               ['WaitTime', 'WorkTime'],
               ['WaitTimePerformed', 'WorkTimePerformed']
            ],
            types: {
                'TaktTime': 'step'
            }
        },
        color: {
            pattern: ['#2A4B7C', '#1E90FF', '#B93A32', '#AF9483', '#FF0000', '#708090', '#708090', '#708090', '#708090']
        },
        axis: {
            x: {
                type: 'category',
                tick: {
                    rotate: 75
                }
            }
        },
        tooltip: {
            order: null
        },
        zoom: {
            enabled: {
                type: 'drag'
            }
        }
    });
@netil netil added the question label Sep 21, 2020
@netil
Copy link
Member

netil commented Sep 21, 2020

Hi @cantareamantisest, do you mean data shapes to be positioned at the center of the x Axis tick not counting the nullish value?

If so, there's no way for now. Because every shapes' positions are calculated based on the dataset counts.
I'll take considering for the future enhancement.

@cantareamantisest
Copy link
Author

I'm waiting for the update.
Thank you for your attention.

@jeesim2
Copy link

jeesim2 commented Oct 5, 2020

This is a good idea.
Dedicated categorical (hortizontal/vertical) bar charts (with/without space) will be great for usecases.

netil added a commit to netil/billboard.js that referenced this issue Dec 21, 2021
Implement bar.indices.removeNull option, where
make positioning each bar shape's position on each tick
removing nullish values.

Ref naver#1687
@netil netil added feature and removed enhancement labels Dec 21, 2021
@netil netil closed this as completed in b16605d Dec 21, 2021
github-actions bot pushed a commit that referenced this issue Jan 5, 2022
# [3.3.0-next.2](3.3.0-next.1...3.3.0-next.2) (2022-01-05)

### Bug Fixes

* **event:** fix touch event handling on arc ([d3d2e05](d3d2e05)), closes [#2477](#2477)
* **types:** Fix plugin's type definition ([f3690f9](f3690f9)), closes [#2483](#2483)

### Features

* **axis:** alow user to hide tick lines while using culling ([aad8c45](aad8c45)), closes [#2478](#2478) [#2480](#2480)
* **bar:** Intent to ship bar.indices.removeNull ([b16605d](b16605d)), closes [#1687](#1687)
github-actions bot pushed a commit that referenced this issue Jan 14, 2022
# [3.3.0](3.2.2...3.3.0) (2022-01-14)

### Bug Fixes

* **api:** Ensure svg nodes to be removed from memory  ([f49ed83](f49ed83)), closes [#2489](#2489)
* **event:** fix touch event handling on arc ([d3d2e05](d3d2e05)), closes [#2477](#2477)
* **text:** Fix text position with candlestick type combination ([f84ab3e](f84ab3e)), closes [#2436](#2436)
* **tooltip:** fix candlestick tooltip display with xs option ([0278067](0278067)), closes [#2434](#2434)
* **types:** Fix axis types definition ([92fb033](92fb033)), closes [#2499](#2499)
* **types:** Fix plugin's type definition ([f3690f9](f3690f9)), closes [#2483](#2483)

### Features

* **axis:** alow user to hide tick lines while using culling ([aad8c45](aad8c45)), closes [#2478](#2478) [#2480](#2480)
* **bar:** add non zero based bar chart ([3588abe](3588abe)), closes [#2408](#2408) [#2438](#2438)
* **bar:** Implement stacking bar radius ([8f14d1a](8f14d1a)), closes [#2428](#2428)
* **bar:** Intent to ship bar.indices.removeNull ([b16605d](b16605d)), closes [#1687](#1687)
* **option:** Enhance padding to be removed completely ([2052a19](2052a19)), closes [#2367](#2367)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants