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

Set custom formats other than d3 only #7470

Open
CrashLaker opened this issue May 7, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@CrashLaker
Copy link

commented May 7, 2019

Hi all,

I'm wondering If we could setup our custom data output format besides D3's

My problem is. When aggregating columns using pivot tables what I get is a result like this:
image

For the image above superset's actually using d3.format(".3s") to print it but I actually want it to be divided by a factor of 1024.

I would be awesome if we could pass Superset some sort of javascript function for it to work on.

image

@issue-label-bot

This comment has been minimized.

Copy link

commented May 7, 2019

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@doctording

This comment has been minimized.

Copy link

commented May 8, 2019

in excel, there are many formats
image

we change the style(we do not like d3, we think it's not friendly) to make it like in excel
image

this feature can be set at all charts, eg

image

@CrashLaker

This comment has been minimized.

Copy link
Author

commented May 8, 2019

Hi @doctording,

thank you for your reply.

Even in excel I couldn't get it to work.
In excel I'm using this custom format "[<1000000]0," GB";[<1000000000]0,," TB";0,,," PB"" but that's really not converting it to TiB or GiB (dividing by 1024).. but again that's another issue.

If I'm to convert it directly in Superset my thought was to add some custom formats other than D3's just like the image you've sent.
I don't have that on my superset
image

did you build it yourself or is it from a recent version?
I'm using version 0.31.0rc18.

I'd be extremely glad if you could share it :)

@doctording

This comment has been minimized.

Copy link

commented May 9, 2019

oh, it's a secondary development in my company.

number format should not be a problem. it's just a display problem, it could be solved.

@CrashLaker

This comment has been minimized.

Copy link
Author

commented May 9, 2019

Any chance on sharing it?

At least the steps, files..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.