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

Table Visualization doesn't use custom column labels #130

Open
bendok opened this issue Jan 17, 2018 · 1 comment
Open

Table Visualization doesn't use custom column labels #130

bendok opened this issue Jan 17, 2018 · 1 comment

Comments

@bendok
Copy link

bendok commented Jan 17, 2018

I've noticed that if you have a dashboard using a table visualization, it will not pull the custom column labels that have been set for the visualization, but rather the raw column names. Those tend to be extra verbose in our case and take up to much space in slack.

@wilg
Copy link
Contributor

wilg commented Jul 25, 2018

Yes, this is true. The label function of the slack table formatter needs to account for this:

private renderFieldLabel(field: IQueryResponseField): string {
let showViewNames: boolean
if (!this.query.vis_config || typeof this.query.vis_config.show_view_names === "undefined") {
showViewNames = true
} else {
showViewNames = this.query.vis_config.show_view_names
}
if (showViewNames) {
return field.label
} else {
return field.label_short || field.label
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants