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

Some usefull features to display tables and charts #558

Closed
matiascarazzo opened this issue Sep 15, 2015 · 12 comments
Closed

Some usefull features to display tables and charts #558

matiascarazzo opened this issue Sep 15, 2015 · 12 comments
Labels

Comments

@matiascarazzo
Copy link

Arick , I was creating some charts and the tools is really easy to use with excellent results.

Here are some features that I think that can help improving the charts and tables in the dashboards:

-Would be good if we can select which columns should be displayed and which not in a table. Also would be nice to format those columns (numbers, dates, etc)
-In the graph chart if I use a date as x axis it display the labels as timestamps even if i format it as date()
-Add spinning wheel when tables are Loading. I saw that it says "Loading" in the charts.

@arikfr
Copy link
Member

arikfr commented Sep 24, 2015

All of this sound like great suggestions, and I actually planning to work on table options when I'm done with UI for parameters, which I'm working on now.

As for:

In the graph chart if I use a date as x axis it display the labels as timestamps even if i format it as date()

Can you elaborate? How the data looks like? As long as the resulting values are "real" date or datetime values, the chart should have no problem with it.

@matiascarazzo
Copy link
Author

Arik , please find attached an image of the X axis labels that the chart is
displaying.

x axis with dates

Regards,
Matias

@arikfr
Copy link
Member

arikfr commented Oct 6, 2015

  1. What did you define as the "X Axis Type"?
  2. What kind of datasource? Is the column a "real" date time? (can you add a screenshot of how the column looks like in the table visualization)

@matiascarazzo
Copy link
Author

Arik,

  1. I defined "X Axis Type" as Category
  2. The datasource is a string.
    I've added the screenshot for the query and the table visualization.

img2
img1

@jmvasquez
Copy link
Contributor

You can use the following:

string(STRFTIME_UTC_USEC(DATE(date_time), "%Y/%m/%d")) as date

It works fine for me.

Regards,
Jose Vasquez.

@stanhu
Copy link
Contributor

stanhu commented Oct 9, 2015

I think this relates to #411. Since DATE returns simply a day string (e.g. 9/28/2015), the Moment constructor on the frontend converts this to the local time. If your time zone is UTC-03:00, then you will see wrong dates like that. I spent some time last week adding a default time zone used by the database (e.g. UTC) to avoid that issue, but haven't had time to get it into a mergable state.

@stanhu
Copy link
Contributor

stanhu commented Oct 9, 2015

Also I think the bug occurs because the frontend does pattern matching on the timestamp type, so even though you cast the date into a string, it doesn't matter. I was working on fixing that too.

@arikfr
Copy link
Member

arikfr commented Oct 10, 2015

@matiascarazzo use "Date/Time" as the X axis type, and return a date value (instead of string) from the query (no need to cast to string). @jmvasquez's suggestion of returning a string formatted as Y/M/D will work too (as long as you choose the "Date/Time" X axis type).

@stanhu in his case, it looks like the problem is due to converting the date value into a string + defining the X axis as Category (instead of "Date/Time"). If he wasn't converting to string, it would be correctly detected as a date (for most data source types, that return correct types for columns).

@JohnConnell
Copy link
Contributor

Hi @arikfr,

I'm using the following query to return just the date from a datetime column : DATE(datecolumn) AS OrderDate

Everything looks good in table view:
date_column

When I make a chart, the tooltip appends ", 12:00:00 AM" to all of the date values though:
chart

Is there a way I can remove the time from showing up in the tooltip? The X Axis Type is set as "Date/Time" in my chart. Could there be a new X Axis Type added that is 'Date' only?

@arikfr
Copy link
Member

arikfr commented Dec 29, 2015

Hi @JohnConnell,

Unfortunately there is no option to override it, because the label is being formatted the same way if it's a date or date time. I've opened an issue to improve the charts tooltip (#728), and you're welcome to follow it to get notified when it will be resolved.

@arikfr
Copy link
Member

arikfr commented May 1, 2016

@arikfr
Copy link
Member

arikfr commented Oct 21, 2016

Closing in favor of #1356.

@arikfr arikfr closed this as completed Oct 21, 2016
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

5 participants