changing the displayed labels on a tableau liner graph - graph

In my tableau visualization I need to show the change in a metric over every minute for a day.
I have a "minutes" table in my db. Each row has columns: "minute_id", type int
"minute", type string: carries the value of the time eg: "05:33, 12.30, etc"
"min_date_time", type datetime: carries the value of the time datetime equivalent of the above string value eg: "2013-11-01 2:30:00 AM, 2013-11-01 2:31:00 AM, etc"
A second table called "demos" has all the metrics that are shown for that specific minute.It has relevant columns as follows:
"minute_id", type int: foreign key for the minutes table
"ind2plus", type float: value to be displayed on the y axis for each "minute_id"
This is what I have so far:
The problem Im trying to solve is:
On the X axis currently the displayed unit is "minute_id".
I would like to keep minute_id as the values on the X axis,
but I would like to change the values "displayed" as labels on the X axis from
the int value in the "minute_id" column to the string value in the "minute" for every "minute_id".
How do I do that? Please advise.
UPDATED GRAPH:

If you have a true datetime field in your data, you get more flexibility by using that field for most situations.
So I suggest putting your min_date_time field on the columns shelf to replace minute_id.
Tableau allows you to use dates and time fields in many different ways for different effects -- so many options that it can be confusing. You have to choose whether to treat the field as a dimension or measure, whether to treat it as discrete or continuous, and what level of granularity to use (hour, minute, month, exact date ...) It will take experimentation and experience to get comfortable with implications of the different choices.
For your graph, I would start by choosing a continuous dimension at the minute level. You can adjust the settings by clicking the little triangle on the right of the pill on the columns shelf. The truncated date settings are the second batch of date menu options and result in a green pill. Once set, you can drill up/down granularity with the + on the left of the pill.
Finally, once you are happy with your chart, you can change the formatting instructions to affect how dates are displayed on the axis. Right click on a number on the axis, choose format, and then in the format pane, under scale you should see a pull down labelled Dates. You can choose one of the existing date formats or enter a custom one. The format strings are pretty much what you expect.

Related

Plotting multiple lines in Tableau

I read every possible forum and I couldn't find a specific answer. I'm new to Tableau and I need to perform what I thought would be a very simple task but I can't figure it out.
I need to create a chart with multiple lines plotted in the same graph. On one column, I have a timestamps in seconds (decimal). For each timestamp value, I have 4 columns associated (Temperature, Pressure, Humidity, Voltage) and I need to visualize how they trend over time. The data in Excel looks something like this (I simplified it for visualization purpose):
In Excel, it takes me less than seconds to obtain a chart that looks like this:
How can I replicate the same exact chart in Tableau? I would like someone to tell me exactly how each column should be formatted, if the data has to be a dimension or a measure and data type for each (string, number etc) and what steps to take in the chart. I would do this in Excel but the file is almost 1M rows and Excel keeps crashing.
drag & drop measure values & timestamp.
EDIT - first make Timestamp a dimension instead of a measure, and make sure it remains continuous instead of discrete. So you should not see the word SUM in front of Timestamp
remove no. of row & timestamp from the measure values.
uncheck aggregate measure.
EDIT this step is not usually needed or desirable. If you do have multiple recordings per Timestamp, you will want to select the best aggregation function for each measure, perhaps AVG or MEDIAN instead of SUM
select line from mark and drag measurement to color
If your X-axis is a Date Column, (i.e. You have a list of dates on your X-axis)
Drag your 'date column' to Columns and choose Month/Year/Week etc. and make it continuous
Drag 'Measure Names' to Filters and choose your Measures
Drag 'Measure Values' to Rows
Drag 'Measure Names' to the Colors section of the Marks card

Date-time axis working as string, not as proper continuous date/time axis in Zing Chart

I am plotting date-time vs integer in ZingChart. Even if there is difference of one second or the difference of 1 hour, the width is same between the two points. If the starting time is same as the previous one, like in my attached image at 23:24:40, there should not a white gap in between if it is proper date and time axis. Is there any solution to this problem? You can also view it on alnnovative.com/zing6.php
ZingChart will automatically place values at each index, unless you use key, value pairs as your data points. To do this, set your series object values like so:
"values":[
[1420070400000,50],
[1420071000000,50],
[1420070520000,50],
[1420070640000,50],
[1420070700000,50],
[1420070760000,50],
[1420070820000,50],
[1420070940000,50],
[1420071060000,50]
]
Take a look at this demo. I'm a member of the ZingChart team, let me know if you need more help.

Date Axis in a Telerik Reports Line Graph

Does anyone know how to set up a date time axis to use DateTime Scale in a line graph in Telerik Reports? I have been trying to figure it out for over a week now. I don't understand why this thing has to be so difficult to use. I started by setting up a line graph.
I have three columns DATE, SALES_COUNT, and SALES_TYPE. I want there to be three lines on the graph. One for each value of SALES_TYPE. I used SALES_TYPE for the series, SALES_COUNT for the value, and since I didn't have any other options left, I used DATE for Categories. I clicked finish and previewed my graph. The graph looked right except I wanted to make a few customization to the DATE axis. Specifically I only wanted it to write out a date label for every 5 ticks or so. There was no way to do this.
Eventually I figured out that I have to set the axis to use DateTime Scale since it defaults to Category Scale. I set it to date time scale and previewed the graph again. I got the error: "X value cannot be null or empty when using DateTimeScale, lineSeries1", so I went to lineSeries1 and set the X value to "= Fields.DATE", and clicked preview. Now the graph nolonger displays any of my data points, and there is only one tick on the DateTime axis and its labeled as 1/1/2015 12:00:00 AM, a DateTime that is not even in my dataset. I have been struggling for over a week now to figure out how to do this simple task. Please help me.
The SQL query I was using was handed to me by the DBA. I never really looked at it, I just stuffed it into the report. It turns out the query was returning the DATE column as a varchar. Once I cast the DATE column as a date in the select column list of the query, Setting the axis to use DateTime Scale worked fine. If anyone else runs into a similar problem, check the return types of your columns.

Histogram not displayed properly in Kibana-3

The histogram i created with my data is shown as a thick block. There are valid hits numbers and dates on the y and x axis respectively, which indicates the data is proper. What can be done to scale it down to an understandable one?
The problem with your histogram is that the data you have indexed would be having a good frequency against the date and/or the data might be months old. So the default interval option for Kibana is set to one year.
You can change it by changing the default time period from "year" to any other smaller values under the section "view" (marked as 1 in the below figure) in the "Interval" dropdown (marked as 2).
More on histogram analytics can be from this blog

Flex LineChart advanced horiztonal axis?

I want to make a line chart that allows the user to select a date range for the data. For example if the date range span is more than 1 month, I want to to have a bar that shows the months, also if the date range is around 30 days or less I want it to show the dates for each day as well. Something like that.
Does anyone have any suggestions?
Thanks!
I would suggest using a DateTimeAxis, and setting the labelUnits property to "days" or "months" as appropriate. The axis will then do all the hard work of grouping your data accordingly.
In your particular case, when the user makes a choice from the combo box, you should have a handler that computes how granular to make the x-axis based on the user's date selections.

Resources