Stacked Bar Chart that shows multiple rows of data together for a single line on a chart - excel

I am working on a smaller data set to create a gantt chart that displays data for multiples rows on a single line chart. For example an activity A is started on a certain date on Line 1 for 2 days and then same activity is started again on a certain date for some other duration. I have tried to create a gantt chart but for each activity it creates another row. I have achieved the required result in Tableau but I am unable to create it in Excel.
The chart I created in excel.
The kind of chart I required..
Excel File
It would be really helpful if someone could tell me what I am doing wrong because I am unable to find out the issue.

With a lot of creativity you could achieve something close to what you want.
I want to highlight two things:
It take some times as modification needs to be applied to each series,
and you need to create a custom Y-axis as Excel own Y-axis will not be used.
Result will be a Timeline chart:
Step-by-Step guide:
First we need to modify the data table.
Add a new column which will represent our Y-axis values (I call it: "Y-Axis Position" located in column F). Those values will replace the "Line" column which had values PD-18, PD-19 etc (we will create them by hand later).. It will determine at which height the bar will be placed.
Time to create a Scatter Plot.
I would suggest to mark only one series (1) and then click the icon Scatter (2). In my example I choose serie "AX 1".
Then add your additional series.
I take one at each time (If you have done correct you will see that each new series will get each own color (in picture I get blue and orange).
For X-values I use the "Date" and for Y-values I use "Y-Axis Position".
You could also add the Series Name, which will would be "AY 1" in this case. Then it will be correct in the chart "Legend".
Add the error bars to the Scatter plot.
Fastest way is to mark the chart and click on the "+" sign and then "Error Bars". (Otherwise click on Chart -> "Design" (at top) -> "Add Chart Elements" (to the very left) -> "Error Bars" -> "Standard Error".
Click on the upper/lower error bars and then delete those (click "Del" on your keybord).
(Picture below shows, deleted error bars on the right series. The left series is how I select my error bars before I delete them)
Time to modify the graph.
I start with the markers, because it will be easier to click at later on. Click on the markers (1) and go to "Fill & Line" (2) at the list to the right. Click on "Marker Options". I notice that the big square I have highlighted worked good visually. (If you don't get as many as in the picture, try to copy the chart. Use the one you copied and then go to marker options again, you should see more marker types now...).
I choose Size 10. I also change the "Fill" colour to a predestined colour and also the border colour so they match. I do the same procedure for both series.
Mark your error bars (vertically) and go to "Error Bar Options", the small green bars at the top. You see them at the right in the picture (below word Format Error Bars).
Click on the "Plus" (we only want positive error bars) and also choose "No Cap".
Do it for both series.
Time to modify the length of the error bars.
Mark one series (1), then choose "Custom: Specify Value" at your right (2). A little window will pop-up (3). The error bars length will be determined by the duration values (4). All the duration for the specific series should be used (notice I only choose 3 values). Do it for Both "Positive" and "Negative" values.
In my example I have marked the blue serie (AY 1). So I will use the "Duration" values for "AY 1" for both positive and negative error bars.
Time to modify the visualization of the error bars.
Click on the error bar. Then go to the "Fill & Line" options (the little paint bucket), then I change my colour so it match with my marker colour. Last thing I do is to change the width to size 10 (same as marker size). Do it for both series.
Add Data Labels to your series.
Click on the marker (that's the reason I keep them) and choose "Add Data Labels" -> "Add Data Labels" as the picture below shows. Do for both series.
Customize the data labels.
Right click on the labels (notice all is highlighted for one series), then click "Format Data Labels". Go to "Label Options" (small green bars to the right). Untick "Y Value" and then click "Value From Cells". Choose the name that will be representive. I choosed the Batch name, i.e. AY 1 ,range C5:C7. Click ok. Do it for both series.
If you want, you could format the X-axis. Right click on the X-axis and choose “Format Axis”. Click on the “Axis Options” (green bars) and the choose a good start date. I added 1 date to reflect the numbers better. You can also choose "Units" -> "Major" and set 1,0. Then every date will be shown in your X-axis.
I also customized the date format to day-month by write: DD-MMM;# in the “Type” field. (Notice I have Nordic setup/language.)
Modification of the Y-Axis.
I “modify” the Y-Axis as we don’t want the position number (they don't give any valuable information). I create a “Text Box”. Go to “Insert” -> “Shapes” -> “Text Box”.
Drag it and enter the Y-Values. Notice I do my Text Box rectangular and try to fit my values in same height as the original chart numbers which was 1,2,3 (Column F: "Y-Axis Position"). Then I mark my chart Y-axis that has numbers and delete it. Last I place my customized Y-axis and group the chart (when I move my chart I don't need to re-positioning my customized Y-Axis). The Text Box background color is “No Fill”.
I have also deleted the background grids by clicking on the vertical and horizontal lines and delete them.
Last thing I do is to mark the borderline of my chart and choose “No Line”. I do the same for my text box.

Related

How do I create a contour map like the one in the attached image? (preferably in Excel, but open to other options)

I need to create a graph that properly represents the profit-maximizing model of aircraft in different scenarios. I apologize in advance for my lack of understanding in what exactly to call it. As mentioned, I have found the type of graph that would best represent this, but cannot figure out how to code/create it. I have tried using Excel and Think-Cell (and either one of them may work, I just haven't figured out how) and haven't had much luck. The image below represents the ideal graph, linked here:
Does anyone have any idea how to best go about this? Thanks in advance.
Edit: The data I have now looks like this, linked here:
You need to use the data to generate a Stacked Column chart.
Here is how I set up my own example data (before you posted your own data format):
Next, select all rows and only the first four columns of the data (42R x 5C) and Insert-->Charts-->2D Column-->Stacked Column. You should get a chart like this:
Then change the vertical axis options to show Bounds Min=1.0, Max=4.0, Units Major=0.2, Minor=0.1.
Next, select any of the data series in the chart and format the Series Options for Series Overlap=100%, Gap Width=0%.
After that, I deleted the Title and Legend, set the Line Style for both Axis to Solid Fill, Black Color. Then I changed the data series colors to be close to your example. Lastly, make sure the chart is selected (the border is highlighted with the squares at the corners), then Insert a TextBox over your data and type "B747-200P2F" and manually place it over the correct data area. Repeat this for the other series and you get this:
Finally, we'll work on the Jet Fuel price line. This series will be added to the chart, then plotted on the secondary axis and it's chart type changed to Line.
To start, select only the Jet Fuel price column (F1:F42) and then copy that range into the clipboard. Then, make sure the chart is selected and, from the Home ribbon, select Paste Special. Use the default settings, or choose Add cells as New Series, Values (Y) in Columns, check Series Names in First Row, uncheck Categories (X Labels) in First Column, then click OK. (Not much will seem different on the chart yet!)
The next steps are important to take in order (at least for me). Select only the "Jet Fuel Price" series and change the Series Options to Plot on Secondary Axis. Then change the axis options to set the range from 1.0 to 4.0 and set labels to None. Just so we're tracking, here's what I have so far:
The (almost) final step is to select only the "Jet Fuel Price" series again, then right click it and choose Change Series Chart Type. Make sure you select the Combo chart type and make the selections for each of the series chart types as indicated in this picture:
Now (finally!) just add another textbox, put in your label and set the text color to red.

Excel sunburst chart: Some labels missing

I've made a sunburst chart in Excel (2016) and want to add labels to all data points. The problem is, that Excel discards some of the labels automatically:
It seems that labels are removed either because the datapoint is too small or the label string too long. How can I get Excel to show all labels?
Short answer is no. Sunburst graph doesn't seem to be able to align the data labels in a custom way (labels outside area).
You could achieve a very close graph with a Doughnut chart. Needs some more modification but is doable.
Result:
Step-by-Step guide:
We start with rearrange the data. We crate two tables. 1st table is for the region part and the 2nd table is for the sub region part.
For Region 3, I sum all the sub region values (50+60+1 = 111).
I mark the inner circle first, which will be my Region parts, and then I create a Doughnut Chart.
Add second serie.
I add my second serie which will be the Sub regions.
Modify size of circular sectors.
I click on one serie and go to "Series Options" (small green bars), then I rotate my chart by "Angle of first slice" (285 = 90 degrees for "sub region 2) in your example) to 300 degrees and I also make each series thicker by set "Doughnut Hole Size" to 40%.
Add data labels.
Right click on the series and choose "Add Data Labels" -> "Add Data Labels". Do it for both series.
Modify the data labels
Click on the labels for one series (I took sub region), then go to: "Label Options" (small green bars).
Untick the "Value". Then click on the "Value From Cells". In the little window mark your range. For Sub Region I choose range B2:B7 (The whole sub region range, since we want it proportionally correct).
Do the same for Region Part, Here I choose range A13:A16 to represent my data label range.
Edit each circular sector so they match.
I click on a single circular sector (blue outer area), see picture below:
Then go to "Fill & Line" and choose "No Fill" for the areas that shouldn't be visible.
For the other areas that should match (Sub Region 1, Sub Region 2 and Sub Region 3) I choose "Solid Fill" (below "No Fill") and match it with with Region 3 colour.
Last thing I did was to delete the legend in the bottom of my chart.
If found that when I made by chart area really, really large then opened the Chart Design Tab and selected a few different styles, my labels magically appeared, and I could then go back to my original style choice and they were there. The labels are pretty tiny, but they're there. I could then select the forat Plot Area, Plot Area Options, Data Labels, I could resize the fonts. No idea if this will print or not, but so far so good....

Need to add dotted lines in scatteplot Excel

I created the below graph doing a scatteplot in excel then inserted the grey dotted lines by designing them one by one. I was wondering if this could be done automatically by inserting the data serie for the dotted lines into the chart.
Yes you can do something close to it, by combining a Scatter Plot chart and a Stacked Column chart.
So result will be something like this:
Step by Step guide to create the chart.
The data looks like this:
Mark the first part of the data, where the column "Data Bar" will be the difference between your two scatter plot values. It will represent the "area" between your scatter values. Choose to plot a "Stacked Column" Chart.
Hide the lowest part of your "Stacked Column" by click on the "blue part" of the bar which I named "Hidden Bar". Go to "Format Data Series" and choose "No Fill".
Add the part that will be your data for the "Scatter Plot". For me it was the column LowerBoundBar and UpperBundBar.
Your graph should now have four layers of Stacked bar. Go and change the Chart type by clicking "Change Chart Type".
Here is where the magic happens. Go down to Combo. Choose the two first to still be "Stacked Column". The last two series should be "Scatter". Your options should look like the picture below.
Time to modify your chart so it looks a bit nicer. Mark the clustered bars that represent "Data Bar" values. Go to "Series Option". Maximize "Gap Width". It will make your clustered bars thinner.
Time to get rid of the orange color. Go to "Fill & Line" option and choose "Pattern fill". Use the horizontally dotted line (marked with yellow).
Then go down to Border options (lower in the picture). Choose to use white border and make them a bit thicker by increasing "Width".
Finally you might need to resize the whole chart (the outer circles in the big chart in picture below) so the lines shows up better. If the whole graph is to small it will only be white. If it's to big it will show two parallel dotted lines.

How to set the max value at 5 in a radar graph in Excel whereas all the values are smaller than 4

I have an excel radar graph.
I have many criteria. Every criteria has to have a value between 0 and 5. But if all the values are strictly smaller than 4, then the graph considers 4 as the max value, but I still want 5 to be the max value.
How to do that ?
Thanks,
You didn't say what version of excel you are using but you can change axis min and max in a radar chart just like any other chart.
select the chart
on format tab select Radar Axis from the drop down (under current selection tab)
Click format selection and then change your min and max.
You can click on the chart and go to the ‘+’ beside the chart which shows the chart elements. The first element is ‘Axes’.
If you hover the arrow more right on the ‘Axes’ row, you will see a small black arrow that you click -> then click ‘More Options’ and you can change the Minimum and Maximum bounds of it .
Coincidently enough had the same issue with the same max value.
First right click for "Select Data..." On the left side for Legend Entries. Click on "Add" and you will come to an "Edit Series" popup. Give it a "Series name" and for the "Series values" input "={5}" instead of the default "={1}". And that's it. You should have two Legend Entries; one for your main data source i.e. Series1 and the new one just created.

How to draw line X=1?

I know how to draw a line with scatter plot options where X is the independent and Y the dependent variable.
In the scatter plot of that data I need to add another line: X=2. I have the following data:
But how to draw a line X=1 ?
Maybe you want something like this:
I hear that charting is more different than many other aspects of Excel between versions and that perhaps my version (Excel 2007) is one of the least ‘friendly’ hence some of the reason for “not very easy” but the principle is as #Bill the Lizard has described. In view of some weird behaviour with (my?) Excel 2007 however I recommend being careful about the sequence in which the lines are drawn.
First I suggest getting your chart right for all aspects but the green line. Then add another series with X values of 1 and 1 and Y=2 values of 10 and -2 (or whatever the limits are of your chosen y-axis as displayed). Select and copy that array (four cells) select your chart and Paste Special…, and Add cells as New Series, Columns, Categories (X Values) in First Column, OK.
This should add a vertical line of the same chart type as the existing (ie XY (Scatter) Scatter with Straight Lines and Markers). The colour can be changed, by selecting that series (click on it and Format Data Series…, Line Color etc) and presumably you would want the markers removed. It was these that for me at first refused to disappear to order – but persistence paid off. Click on either of the data points, and under Marker Options choose none for Marker Type. If necessary, repeat for the other data point – and keep repeating if required!
Also, I selected what was showing as Series3 (text) in the legend and deleted that.
Forgot to mention that for anything to do with Excel charts Jon Peltier is the ultimate authority (eg) and that an alternative approach is to use an error bar and a secondary vertical axis.

Resources