I'm trying to draw two datetime series each with different timestamp ranges on top of each other instead next to teach other. For example if I have two chunks of data, one for last week, another for current week (divided per days) and all I want is to draw them both on top of each other. With the default options both charts are drawn next to each other which does not offer the possibility to compare the value for today (Ex: Tuesday) with the value from Tuesday last week.
Thank you.
In this case I would recommend that you not make the xAxis a datetime series. Instead, if your data is recorded daily make the xAxis.type: 'category' with the days of the week. Then make your 2 series be one for week1 and the other for week2.
Related
I have a dataset with dates from 2011-01-01 to 2018-08-01, showing data for every 1st day of the month. I would like to create a control chart (c-chart) accounting for the number of days in each month.
I will freeze the control limits at the last month of the baseline period (February 2015) and extend these limits across the intervention period (i.e. the rest of the period covered by the data). Then i will draw a vertical line to separate the baseline and intervention periods, using the format_spc_chart function to format the chart so that the rule breaks are highlighted.
I tried to look at the help for the lubridate function days_in_month but I am stuck to create this chart. Here is my code:
enter image description here
Although it gives me the qic chart (but not in days in month which I would need), I have nothing for the ggplot chart.
thank you for your support.
regards
Ellie
I'm new to R and I'm stuck with this data.
The data provides genders, sleep duration on weekend and on weekday ( 3 columns) and I want to make a plot like this
I could draw it separately for weekend and weekday. I've tried to use the same x-axis and make another dataframe to calculate porpotion to fill on y-axis, but it doesn't seem to work.
And I donot know how to stack another table at the bottom like that.
I need some help, thanks you all!
And here is the data I've collected with rstwd presents sleep duration on weekday and rstwk presents sleep duration on weekend etc ...
I have created the attached dashboard in powerBI. It is a monthly report. That shows the count of item each month. The dates are in this format 1/1/18, 1/2/18, 1/3/18 that the first day of every month
When I created the report powerBI are skiping one month at interval. See Pix attached.
how can i show all months?
Desired
I believe you'll need to change the "X-Axis" type to "Categorical". It looks like it's defaulting to Scalar, which makes a continuous axis and picks tick marks based on available space.
You could try decreasing the font size of the month labels since Power BI might be avoiding overlap. You could also try shortening the length of the label from MMM-YYYY to MMM-YY.
I have an excel sheet which I am plotting two values over time. But when I plot it in Power BI it shows the sum of those values in y-axis rather than the actual value. The plot looks like the following.
If you see the y-axis they are in billions. But if you see the actual data below its in hundred thousands range.
If I use date hierarchy instead this is how it looks like.
Since your data is on specific days, you should use dates on your axis rather than weekends. When you have weekends on the axis, it groups all the days within that week together, which is not what you want.
Edit:
After looking at your file, it has nothing to do with dates after all. It looks like the data is recorded at a weekly level. The reason its adding up like that though is that for each date there are a bunch of different rows that correspond to different geography (your geo column has state name abbreviations).
If you add a slicer for geo and look at the chart for a single state at a time, then I think you'll get more what you're expecting.
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.