Time Stack Chart with years as horizontal axis - anylogic

I want to add a stacked chart but could not find a way to customize the time-axis.
Currently my x-axis refers to days, however, I search for a way to display years. Since I want a stacked chart that changes over time, I believe I need to use the 'Time Stack Chart' (see screenshot). I would also be happy with simply several stacked bars next to each other (each bar represents one year), but the 'Bar Chart' only supports one bar (I believe).
My model collects data from different sources on the last day of the year and then my chart should display this value for the year, categorized by source. I have tried with different data sets, both where the time is the horizontal value and where it is not.
When I use a dataset where one value is 'Years' (through the getYear() function) this works fine for plots, but not when I want to have a stacked chart (which by default depends on the time).
Is there a solution to this?
Please let me know if you need further information!

You need to go to the appearance part, time axis format, set it to yyyy. Also in the scale section, you need to change model time units to years.

Related

Merging Percentage Lines with The Bars in Tableau Desktop

I have a graph that shows the ratio (count) of payable vs. processed words among the total words on stacked bars. I would also like to display the same ratio in percentages in lines overlapping the bars.
At the moment I have them in two separate graphs, but I want to merge them so that it takes less space in my dashboard view. I am unable to select the dual combination view as it requires two measures and even though I keep trying to cmd+click+drag the percentage measure pill to my marks, it's only changing the calculations in the bars but not allowing me to select the dual combination view.
Since the percentages are basically the ratio of the green/total in the bars, I don't think I need any complicated configurations for displaying it, however, I am also failing to achieve what I want.
Could you please tell me how to do this visualization?
Edit: I noticed that the reason I couldn't generate the dual combination view was that I had three date pills (year, quarter, month), and by removing two of them, I'm able to generate the dual combination view, but it's far from what I'm looking for as it's only splitting the stacked bar into bar+line.
Neeku, I certainly understand the desire to minimize "real estate" in your dashboard. If I understand your needs correctly, I believe that overlaying a transparent-background chart over the first chart might meet your needs, if a dual-axis chart doesn't work for you (for example, if you wanted to overlay a line chart on a column chart that is itself already dual axis).
By way of example, here is a simple Sample Superstore dashboard with a line chart on top and a stacked column at the bottom.
simple dashboard
Change the line chart to "Floating"
Size it to fit over your column chart and change the background to transparent by clicking anywhere in the line chart and select "Format"
...Format Shading
...and "None" for the color selection
Your line chart is now an overlay, but it's pretty messy.
Click on the line chart and hide field labels,
...turn off "Show Header" for each pill in the line chart
Clean things up and it should look better:
Note: one big issue with this approach is that you will not be able to click to select chart elements of the underlying chart.

I need to sign every week on a diagram in my Power BI report

I've created a bar chart where I have values on axis Y and weeks on axis X. I want to sign every week on this chart. The problem is that I have weeks with no data and I still want to show this blank weeks. But I can't make it to start from first week,it automatically start from first not blank week.I tried to play with continuous and categorical type of data on axis X but it didn't help. I've already chosen option "show elements without data". But it still doesn't look like a want.
For best understanding I'll show you what I have and desired result.
Now it looks
this way and this way
But I want that it look
this way
Thank you for any useful tips.

Tableau bar chart looks different in worksheet vs. dashboard

Trying to make a cute little dual axis line and bar chart, time is continuous on x axis, value on y axis. For some visual flair (formatting still being worked on) I wanted to make banded columns to show months, which are not calendar months (454 system) and are therefore variable lengths of time.
I got it functionally looking how I wanted to on the worksheet. When dragged to a dashboard, even after a ridiculous amount of resizing, I get these weird lines. When I change the size of it, the lines change places.
Anyone have tips on getting these two graphs to look the same?
Worksheet
Dashboard

Special kind of bar chart

So, I have a kind of "customized bar chart" here. Forgive my lack of drawing skills, I just slapped this together in MS Paint.
The idea is that we have a patient who is on a certain medication. The chart has the following attributes:
Each black line represents a visit date (so, the horizontal axis is a date series).
The chart should have a unique indicator for start date, end date, and when the patient paused and resumed taking the medication.
Each visit date (black line) should have a dosage amount attached to it. This does not have to be a symbol, it can be a value (e.g., 2400mg, 4800, etc).
It's sort of a cross between a Gantt chart and a bar chart, but is neither of the two specifically. There are start and end dates, with a bar-like representation across a time period, but there could be potential gaps between pause and resume dates as well.
Is a chart like this even possible in BIRT, or does it require advanced customization?
Let me know if you need anything clarified.
What you should be able to do is build a table for each medication, where the columns are the doses, and dynamically change the width of the columns. Some quick research indicates adjusting the column width in a table can be challenging but here is question about doing it to a crosstab
The easiest way might be to leave the column widths floating, and add characters (same color as background so they don't display). The characters are added based on time between visits and will cause the column widths to change accordingly. You can use highlights to change the background code based on JavaScript.
You may want to have a look at d3. It enables highly customizable chart.
For example, https://vida.io/documents/ZCzewTza4ZSzMWSBG.
BIRT 4.3 has support for D3.

GANTT Chart with Shapes

I'm trying to create something like a GANTT Chart where I would have start dates and end dates designated by a shape like a diamond and then the period of time in between connecting the start and end date shown as a line connecting the shapes. Does anyone have any tips on how to do that in tableau?
For data I have an identifier column, an event column, a date column, a start date column, and an end date column.
To make a basic Ghantt chart in Tableau, put the start date on the column shelf, convert it to continuous exact date. Put the identifier on the row shelf and change the mark type to Ghantt. This should get a short bar at the start date of each task, with a row per task (assuming the ids are unique per task).
Now you need to specify how long the bars should be by putting a field showing the number of days for each task on the size shelf. You can create a calculated field to compute those durations as datediff('day', contract_start, contract_end). Place that on the size shelf and you should be off to a decent start.
You can add more info to the tool tips and use color to show contract type or something else. add some reference lines by right clicking on the axis. You will need some tweaks in the calculated field to deal with things like null (unknown) end dates, maybe recurring tasks ...
If you want a few milestone markers, you can use reference lines or point annotations to add them by hand easily.
Or if you want to include milestones as shapes with your data, you can use a dual axis chart.
Here is an example showing how to combine shapes and bars into one char. The details vary slightly depending on how your data is organized, but if you examine how the data for this workbook is organized, how the data connection joins the tabs, and how the workbook displays the data, you should be able to adapt the approach to your own data. Just realize sometimes it is easier to revise the way your data is shaped to make the analysis simpler.
Also, you might want to consider if you need both planned and actual dates.
See also
Gantt over time with summed bar