Special kind of bar chart - eclipse

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.

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.

Time Stack Chart with years as horizontal axis

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.

How to prevent label truncation in a Cognos BI Pie Chart

I'm trying to create a pie chart in Cognos BI that shows complete labels. I can't figure out how to do this. I have included an image that shows how the current report truncates the labels and places three dots (...) at the end of each label. I have a couple questions:
Can what I want to do be accomplished?
Why does every label end with "..." and can they be eliminated?
Update: I'm running Cognos BI 10.1.1
I don't think you you can absolutely prevent it. But you can make the text longer. In your chart, select the label. In the properties, under general, you'll see Text Truncation. Click the ellipse by it. It's probably set to the default of automatic. Change it to manual, and you can put in whatever number of characters you want it to show.
Keep in mind that this can end up giving you some kind of funky looking charts. The hover will show the full value of the column if you need to be able to see it on demand.

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

Custom Colors in Pie Charts (Crystal Reports 2008)

I am using Crystal Reports 2008 (12.4.0.966), and can't seem to force specific colors in a pie chart.
We are analyzing selected measurement topic (MT) scores of elementary and middle school students. The report has five groups, and the chart is going into the Group 3C Footer (where a parameter can cause it to be suppressed if desired). I have a database column Score that can have values from 0.000 to 4.000. To enjoy some sanity for the resulting charts I impose granularity with the #LetterGrade formula:
SELECT {Reporting_CFSD_MT_Scores_A;1.Score}
CASE IS >= 3.5 : "ADV" // Advanced
CASE IS >= 3.1 : "PRO+" // Proficient Plus
CASE IS >= 3.0 : "PRO" // Proficient
CASE IS >= 2.5 : "APP" // Approaching Proficiency
CASE IS >= 2.0 : "BASI" // Basic
DEFAULT : "BLB" // Below Basic
In the Chart Expert >> Data tab, I've got On Change Of #LetterGrade with specified order based on the order in the formula above, and my Show Value is Count of #LetterGrade. The resulting pie chart gives me the break down of grades that I need.
The problem is that I want each of the six pie slices to have a specific color -- from bottom to top: Red, Orange, Yellow, Green, Blue, (Dark) Violet -- rather than accept the default colors. I thought I could go to the Color Highlight tab in the Chart Expert and have six entries (e.g., #LetterGrade = "ADV" sets a custom color of dark violet (and I've tried it with and without the quotes around the string)), but the first pie slice is always blue, the second is always tan, the third is always green, etc., regardless of what value it represents.
Am I misunderstanding the purpose of the Color Highlight tab? Is it not possible to set custom pie slice colors in this version of Crystal Reports (after more hoops than I care to think about I'm finally downloading SP5, but at the rate its coming in I may not have it fully downloaded until tomorrow; God help me if the solution is in one of the six 5.X or 6.X Fix Packs)? Or am I just missing a trick somewhere?
EDIT:
For giggles I changed the sort order on the Data tab from a specified order to ascending order and now the pie slices are exactly the colors I wanted. So it appears that I can either specify the display order of the slices and have to accept the default colors, or I can let it display in an undesirable order and get the colors I want. Sounds like a bug to me, unless someone knows a trick for getting around this.
If I'm not mistaken, in the report editor, preview the report and then click on a pie slice so it is selected. Then right click on that slice and select "Format Pie Sclice". Then you can change the color, pattern, gradient, etc.
Let me know if that works.
Chris
EDIT: If you want to do it conditionally, I think you may need to specify
#LetterGrade => 2.0
which in the editor should be #LetterGrade is greater or equal to 2.0
instead of
#LetterGrade = "BASI"
But you should be getting a choice of values when you create your conditions. I did a quick sample report with a chart that shows me the onhand value of certain items and I was able to "hardcode" the colors using the steps outlined in my original answer and also conditionally by using the Color Highlight wizard and the predefined values.
It turns out that editing the chart in design view doesn't work correctly. In the design view, when I use the Chart Expert I can either specify the order in which the slices are displayed, or I can designate the color for individual slices, but I cannot do both (also, in the Highlight Color tab, the last box in the Item Editor section -- where you choose the value to match -- does not give me a drop-down menu from which to choose, but instead will only let me type in the value to match: thank you #campagnolo_1 for bringing this lack to my attention, which pointed me toward the solution).
If I instead work in the preview view, click on the chart, and pull up the Chart Expert there (and choose Applied to group template), I can both set the sort order and the highlight color.
I'm guessing this is a bug, but since CR2008 isn't supported any more, I'll just have to live with it.