Given the data arrangement in the image below (from google sheet) I tried to draw a chart showing time consumed by each activity, each activity has a start time, the end time of an activity is the start time of the next activity, I couldn't find a way to visualize such arrangement, is it possible ?
Update: Solution
This is what I reached now
Also I don't have to write end time, here is how I did it
End
=INDIRECT(ADDRESS(ROW()+1,COLUMN()-1))
Duration
=C:C-B:B
Minutes
= D:D * 24 * 60
Note: To draw the chart I had to move the "Minutes" column to the right, i.e labels column has to be on the left for the chart to draw properly.
After that you can hide helping columns C and D as they are just created for intermediate steps.
Yes, you may build a Pie chart based on time entries, but you need to convert time format into number format.
select column with time
go to menu Format → Number → Number
Or, for more visual, convert time formatted numbers into number of minutes:
= Time * 24 * 60
And then draw chart:
Related
We are using chart.js lib Version 3.7.1.We have multichart graph with line and bars. Both using time scale on x axis, but one has one month value, while second has one day value.
example:
const dailyAxis = [27-05-2022, 30-05-2022, 31-05-2022, 01-06-2022, ... 07-06-2022];
const monthlyAxis = [31-03-2022, 30-04-2022, 31-05-2022, 30-06-2022];
The problem is, that daily values could start from the middle of the month or one month could have 20 daily values, other could have 30. Is it possible to align two charts, to have first daily point at start of monthly bar and last point at the end of monthly bar, no matter how many daily values we have?
Currently, I'm having trouble to force the highstock chart to display a blank space up to the current date. It focuses the data I give it.
What I have is:
What I want is something like this
As you can see I want the data to stop at the date of the latest data point and then the graph should show a blank space and stop at the current date. Obv there is not data points for those times
You can control how empty points, and missing points are shown by looking at:
xAxis.ordinal
In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data periods (e.g. nights or weekends for a stock chart) will not take up space in the chart. Having ordinal: false will show any gaps created by the gapSize setting proportionate to their duration.
xAxis.max
The maximum value of the axis. If null, the max value is automatically calculated.
plotOptions.series.connectNulls
Whether to connect a graph line across null points, or render a gap between the two points on either side of the null.
Which means that for your graph, you will want to set:
xAxis: {
ordinal: false,
max: (new Date()).getTime() //to set the current date and time as a maximum
}
I'm looking for a way to display a tooltip/popup in d3 that shows all data for a certain timestamp. I'm displaying up to five data series at once and sometimes, but not always, there are data from two or more data series at the same timestamp, and those I want to show when move the mouse along the x-axis.
Can this be done?
My solution for my problem was to write some own functions that first get the x-position where I click on the chart, convert that to a valid timestamp. Then matching with nearest actual timestamp in the dataseries. Then I show a rect as a window with the data at that timestamp for all series that has data at that timestamp.
I'm having trouble creating the following chart in Tableau.
I have data that looks like this:
name date count
a 11/10/2012 2
a 12/10/2012 3
a 13/10/2012 2
b 12/10/2012 6
b 13/10/2012 2
b 14/10/2012 3
c 14/10/2012 2
c 15/10/2012 2
And I want to create a bar chart that has the sum of the count on the y axis and time on the x axis. The width of the bar should be the length of the time, like a Gantt chart. Each name has its own bar. Here is an image that shows what I am after.
The bars should overlap if the times overlap.
I have tried various things in Tableau but haven't really got close.
Is this kind of chart possible in Tableau? If not in 7, will it be in 8? I have heard it makes it possible to create some more complex chart types.
A workbook with data can be found at http://community.tableausoftware.com/servlet/JiveServlet/download/188799-12362/Gantt%20over%20time%20with%20summed%20bar.twbx.zip
Thanks for your help,
Andrew
The trick with Gantt charts in Tableau is to put a calculation on the size shelf that calculates the duration of each bar in units of days. See the example screenshot at Tableau example
You also need a continuous date field on the columns shelf to get a horizontal time axis.
In this example, I also did a few more optional things, such as, turned off aggegation under the analysis menu to get a mark per data row, rather than aggegating them, added a discrete date to the rows shelf to make each bar go on a different line (as long as each bar starts on a different date) and hid the column for that start date.
I've a dynamic timeseries chart to which some value is added every 20 seconds. I want to set the width of the plot to something like say 30 minutes so that my chart starts showing a "30-min canvas/plot" starting from the left hand side until it fills up the whole plot. After every 30 minutes, I want to clear up the old data and only show the latest 30 minutes data which means at any given point of time, my chart will only show data of latest 30 minutes. I've already created chart and its working great except that the starting domain range gets fixed to the point from where it started even after couple of hours.
Get upperbound after 30 minutes, then set lowerbound to the upperbound and the new upperbound to the old upperbound+30minutes?
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/axis/ValueAxis.html#getUpperBound%28%29