According to the highcharts Docs it should be possible to supply series data to a heatmap in the form [datetime, value], but every jsfiddle example I've seen uses the cartesian form of [x, y, value].
My datetime timestamps are unix time in milliseconds, so all of the required data is available, i.e. date, time and corresponding value, so there is no reason why highcharts should need this time-stamped data to be manipulated into an increasing index.
This guy's question seems to be the closest example I can find, but he himself reverts to using a workaround function
Unexplected results with Highcharts Heatmap
When I followed a similar approach (slightly different for me as I've got 15min intervals) Highcharts seems to interpret the unix timestamp for x-axis labelling correctly, but not for the tooltip or y-axis.
Surely there is a more sensible way of doing this?
Related
I'm currently learning tableau and was creating a graph to map the unemployment with respect to each month. As the period of time was a measure, I dragged it in and it resulted in aggregation by month (of all years together) and a graph was displayed as such:
Now to plot it monthly for each subsequent year, I checked online and saw the conversion method where the same MONTH(PERIOD) was converted to a measure and it resulted in a plot like this:
Could someone please explain why does this work and how is a measure responsible for displaying data in such a way and not the month dimension. I cannot understand the plots when both the axes are measures.
Thank you
...saw the conversion method where the same MONTH(PERIOD) was converted to a measure.
It's not converted to a measure. Period is still a dimension, just a Continuous one. Measures and dimensions in Tableau can be either Continuous or Discrete. The ability to convert one to another depends on the data type of your field. For example, Dates can be converted between Continuous and Discrete, but Strings can't. The green colour isn't for measures - it's for the Continuous type of either measure or dimension.
can anyone help me with this. I had a ggplot where the values in the x-axis are dates. I've converted to a plotly plot using ggplotly. When I use box select or lasso select on my plotly plot the x-axis values are being picked up as numerical dates. I give some of them here
event$x <- c(149653440000, 149662080000, 149679360000)
converting these back to dates doenst work by simply applying as.Date. I've read alot of answers to similar question where as.Date.POSIXct is used but that doesnt work with my dates. Can anyone give help on how to convert these numerical numbers back to real dates?
I can answer my own question now. Plotly is reading my dates in in javascript milliseconds. To covert to a date divide by 1000 by 60 by 60 and by 24 then use as.Date to convert that number back to a date. Basically do the opposite of whats shown in the solution shown here:
https://community.plot.ly/t/manual-date-range-on-x-axis-time-series/1316/2
I have two values I wish to plot against each other in tableau. They are two totals aggregated around the same date. I can get them to the point where they are plotted on a dual access against the date like so:
but any attempt to plot them against each other for correlation has come to nothing. I've tried simple conversion to scatterplot, using calculated fields, using a cross tab with subtitles and attempting to only plot the subtotals against each other all of which have failed. I could do it in Excel but have to do it in tableau.
I have consulted the official Tableau 9.0 guide, google and existing questions on Stack Overflow all to no avail. If I was doing this in BOXI, I could just select the columns and chart them. How do I do the equivalent visualisation in Tableau?
You aren't clear about what type of chart you want to make.
Do you want a scatter plot? If so, put one measure on the row shelf, the other measure on the column shelf, and one or more dimensions (such as your date) on the detail shelf to define how finely to aggregate the data. Check the aggregation functions you use (SUM, AVG) and the aggregation level for your date fields (YEAR, MONTH ...) as desired. You probably want to use the second block of date aggregations on the menu unless you want to group all January data together regardless of year.
If you want a connected scatter plot, set the mark type from automatic to line and move the date field from the detail to the path shelf. You might also then want to put the date on size, color or legend to visually show the direction of time on the line. You might need to change that field to attribute in some cases to avoid creating multiple lines.
Tableau is fantastic once you learn how it works, and get a strong understanding of how choices about treating fields as dimensions or measures, or discrete or continuous impacts the behavior. If you skim over those details, you can still make beautiful charts by following recipes, mimicking examples (and asking StackOverflow), but Tableau's behavior will seem mysterious and arbitrary.
If you take some time to learn the fundamentals about how Tableau works, it will repay your time investment. I recommend Joshua Milligan's book Learning Tableau for a good way to start, along with the training videos on the Tableau website.
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.
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.