How to reduce the displayed Majorgridlines in order to match them to the "Category" texts? - excel

Within this picture, an Excel chart is displaying approximately 100 values + times (red curve):
Excel is "intelligent enough" to reduce the number of the displayed "Category" date+time texts (here: by the factor 6) because otherwise the texts would overlap each other. But the Excel chart still displays ALL the vertical (dark gray) grid lines where my value table contains time markers.
IF my data table contains even more (e.g. 1000) time values, then the displayed "Category" date+time texts are automatically reduced e.g. by the factor 60. But then the chart background is completely covered by vertical grid lines and does not show its background color any more at all.
In fact I would like to keep/show only those vertical grid lines where a Category (time) text is shown, i.e. ONLY at my green lines.
So how to to reduce the number of the displayed vertical grid lines ?
Thanks a lot

Related

How to recreate a bar chart of event times in Excel

Trying to recreate this first graph in excel using the data below it.
Solved this by making the times regular integers, then calculating the start to end difference for each date, widening the data to split the differences among three categories. I then highlighted only the dates and start times, pressed control, and highlighted the 3 columns with the differences.
I selected stacked bar chart, which looked like this by default.
Lastly, I selected the (blue) start time bars and chose no fill as the color. After deleting this series from the legend, the result adequately matched the requirements.

I only want to see actual x values to show on horizontal axis of Excel Chart (with scale matching those values) not let Excel do scaling and labeling

Below is an Excel Chart for the data shown in column A (x-coordinates--dates) and column B (y-coordinates--test results). There's no problem with the column B data. But note that the horizontal axis shows quite a few more dates than are contained in column A.
Is there any way to have only the actual x-coordinates shown on the horizontal axis with a scale that matches those values?
I kind of get it. Excel deliberately scales the horizontal axis to match as best it can the data in column A. But I don't want that. Beneath each "corner" point of the graph, I'd like to see the date that is associated with the test result in column B.
In other words, there is clearly a point with y-coordinate 154.5. I'd like to see 2/13/2018 directly below that point since that is the data in row 5. Note that the x-axis contains the "correct" date for the first plotted point: (2/9/2017, 70). But for the point with y-coordinate 80, it looks as if that test result occurred on 6/9/2017 rather than 6/16/2018.
So I'd like the graph to appear as shown in the second image, which likely would be impossible because of the "crowding" of x-coordinate values at the right-hand end, but just displaying whichever of the three dates would fit would be good enough, as would just showing one of the two dates in other "crowded" areas. That is to say that something like the third image would be fine.
I suppose I could write VBA code to make it happen, but I'd prefer that Excel do it.
(What crosses my mind is, "Are exact dates really this important?" And the jury is still out on this point. There are arguments both ways. I guess a hung jury goes to the judge, Excel.)
By inserting the points to be plotted into two arrays, datesArr and scaledArr, and putting those values into columns A and B (see worksheet) and in code saying ...
Set ch = ActiveChart
Set s = ch.SeriesCollection
s(1).Values = scaledArray
s(1).XValues = datesArr
... I got exactly what I wanted. Now granted that's not exactly built-in, but we're programmers, yes? And this was downright easy. Well, once I learned a few tricks, especially being able to set angle of dates to 45 degrees.
You need to plot two sets of data, the actual values, and a set of zeros, then smoke and mirrors make it work.
Data below left, make a line chart (top left chart). Add data labels to the second series; I colored the labels orange to match the points, for clarity in this description. Default labels show Y values, which are all zero (top right). Format the data labels to show category values (i.e., dates), below the points, rotated upwards (bottom left). Format format format (bottom right). Axis labels: none. Format second series with medium gray lines and medium gray cross markers. Drag bottom of plot area upwards to make room for the date labels. Hide legend.

How to create a timeline with evenly spaced intervals on excel or powerpoint as seen in this image?

I'm trying to duplicate this timeline graph seen in the picture. I understand I can make the shapes, fill in the color, and add text; however, I'm having a hard time creating the simple timeline on excel and powerpoint. In other words how do I create the evenly spaced 1 hour timeline seen in this image?
You could use a chart with all elements deleted except for the bottom axis.
You could also create a 3-row table, with the horizontal line being the border between rows 1 and 2. The numbers can be placed in row 3.

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

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.

Excel chart grid size and multiple colors (no VBA)

I would like to ask for your help on two major problems I have with an Excel (2003) chart:
1) I would like to create a chart which has got 25 grids (5 on the x axis and 5 on the y axis). The number of grids must not change, i.e. data should have no impact on the size, length and number of grids (several different worksheets are used as input to the chart). How can I create such a chart without having different grid lenghts depending on data?
2) I need a chart which has 25 grids, with each grid being colored differently, e.g. for example 3 grids in the upper right corner are red, 3 grids in lower left corner are green, inbetween all grids are colored white. I have read some articles on creating charts with a quadrant background, i.e. 4 grids, each having a different color. But I would like to know how I can create multi colored background for 25 grids?
Many thanks in advance!!
Regards,
Since you don't want to use VBA, there are a number of hand steps that are needed to create the grid chart you are looking for. For the most part, these steps can be taken in any order.
Enter what will be the horizontal column labels in a 1 x 5 cell range in your worksheet.
In the 5 x 5 cell range immediately below, enter the value 1 in each cell.
Selecting the 6 x 5 cell range, insert a 100% Stacked Column chart into the worksheet. You will now have a chart with of bars with five horizontal bands, each of a different color.
Delete the legend.
Select one of the bands to format and set its Gap Width to "No Gap."
Insert a chart title and horizontal and vertical axis titles, if any.
Select each band (data series) and set its fill color to solid fill white and its border color to solid line black.
Select the chart area and set its height and width to identical values.
Lock the chart area's aspect ratio.
Select and set the fill color of each data point (grid cell) that you want in a contrasting color.
(I am unaware of any way to dynamically set the colors of the grid cells based upon different data values, other than via VBA.)
If you want to change the font size of the labels of one of the axes, be sure to set the other axis to the same size to preserve the square grid layout.
Set the major tick mark type of the vertical axis to None, and the font color of the vertical axis labels to white.
At this point, you may want to shift the plot area to the left so that there is more white space between the right borders of the plot area and the chart area.
Select the chart area and then insert a text box over the vertical axis label area.
Enter into the text box the vertical axis labels that you want to show, with a blank line between each label, and with the font size and color of your choice.
Move the text box vertically so that, by eye, the first of labels in the text box is by eye aligned vertically with the center of the top row of the grid.
Select the blank line between the first two labels in the text box and change the line's font size so that, again by eye, the second label is aligned vertically with the center of the second grid row. Continue with the three remaining labels.
If you want finer control of the alignment of the labels, insert a second line between the each pair of labels and set the font size for the second lines in a smaller font than the first lines.
This text box is the only element of the chart that will not automatically resize if you change the size of the chart.
Other than any minor tweaking of the font sizes or alignment of the chart title and the axis labels, the chart is done:

Resources