Excel VBA - Making points invisible removes markers - excel

I'm having a problem to making some points of my series (making them invisible). In the image below, you can see that it goes well until I make the point invisible. The marker's legend get all confused and set the legend to the XValues, in this case "1","2", and so on.
Is it possible to make a point invisible but keeping the original marker legend?

May I suggest to substitute the "invisible" points' values with CVErr(xlErrNA)? That way the line will still be drawn, but these points will be "ignored".
Or do you need to mantain those values?

Related

How To Make Line chart,so that the line chart does not overlap

Hi, I have trouble with my line chart here, the line chart is overlaping and it makes another line is not visible or covered up.
If the data is so similar then the lines will overlap.
One thing you can start with is using a false y-axis zero, starting the chart at, say, 50%, this may provide sufficient separation if the values do have differences.
Is this specific type of line chart necessary?
A 3D Line chart might get past the problem.
Image of a 3D chart with similar data in 2 series
If you want to stop similar/identical lines overlapping without changing their actual values, you're going to need to plot one of those lines on a different scale:
in the 'chart design' tab hit 'change chart type'
change it to 'combo chart', ad set both series as lines but in one of them, tick the box for 'plot on secondary axis'. Or, you could set one series as a different type of chart, e.g. a bar chart.
If both are lines and both axes default to the same scale (which is quite probable), you'll want to edit one of them to adjust the scale. Right click on a chart element and hit 'format', then select either 'vertical axis options' or 'secondary vertical axis options' from the dropdown, then click the fourth icon (little bar chart) and adjust the minimum and/or maximum bounds.
Hopefully that should separate the lines out without changing the values they actually depict. However, if it really comes to that, it might be easier to set them as two different charts. Certainly would make it easier to interpret the values.

Add extra labels to a chart

I'm using Excel 2016 and wanted to know how I can make a chart that represents a spectrum from left to right with labels on both sides, and a marker in the middle. Essentially I want to represent the Myers Briggs Type Indicator.
What I've tried so far is to make a horizontal bar chart with a marker, but I can't seem to get labels to the left and right. How might I be able to achieve this?
You just need to add text boxes from drawing tools and put them on top of the chart. Set their backgrounds to transparent by choosing no fill.

Is there a way to transform rectangle into any shapes in MS Excel?

In MS Excel, I applied conditional formatting to a cell A1 so that it's color changes from blue at value 0 and red at value 100. I copied that cell and pasted it as linked picture(I) specially.(Paste Special). The color of the rectangle picture now changes if value in original cell is changed. The problem is, the shape is only rectangular, it can be converted into square and diamond shape at best.If same rectangle can be transformed into different shapes(maybe by adding extra anchor on rectangle shape), a heat map can be created easily. Please share your insights about this thing if there is a way.
Following pictures may help understand the problem:
[Example][1]
If you want a heat map, please consider using a CHART not gazillions of picture objects, colored/placed/rotated/etc to ... mimic a chart.
First, google anything about "surface chart" in Excel, see how it looks in Excel, whatever. Just see it and think about it so you can compare it to your current approach.
You will observe some things, like:
it's 3D
it has just a few layers/colors
etc.
But really, all of them can be solved. Probably easier than your current approach.
you can easily turn off both axes and you can rotate it so the camera is totally straight top-down - then it looks flat as paper and noone can see it as 3D anymore
you can add more layers, you can set each of them to specific colors
etc.
Some resources:
multiple colors in surface chart
how to change rotation of 3d chart
geesh, I just found even a whole article/tutorial dedicated to creating heat map charts.
Please, read that last link and I'm pretty sure you will want to use that approach instead of doing picture puzzles.

Excel chart with countries in y-axis, % in x-axis, circles as markers and control groups

Do you know if this chart, as shown in the following image, can be done in Excel?
Chart:
I don't even know how this kind of chart is named, so I cannot search in the web for tutorials. I don't need to display three points on every row as in this chart (one is enough), and even I can mark the control group manually.
Yes this can be done in Excel.
If you want vertical orientation like on the picture above, then you should probably use the Scatter chart with quite some modifications. You would set the x values of the series to your values and the y values can be just 1,2,3,4,5.... The biggest problem with this approach would be how to display the correct categories. There is a tool to help you do that and it is discussed here: https://superuser.com/questions/485883/how-to-create-dynamic-scatter-plot-matrix-with-labels-and-categories-on-both-axi
For horizontal one you can use a normal line chart - with hidden line and only markers visible (Excel doesn't support vertical line graphs).
Even three groups are easy to do, you just need to add three series and format them accordingly.
The lines are also quite easy to do, you add minor / major gridlines to the chart and then format those as well.

VBA Bestfit position for datalabels on line chart

I was trying to make my own function to reposition data labels on line chart so they'll be in their best fit.
What does it mean best fit?
The data label wont be above the line itself (I took the higher angle of the point and put the data label in higher-angle/2 - so it will be in the middle of the higher angle) - I succeed to get the higher-angle but didn't succeed to get the position on graph (in pixels, relatively)
After u put the data label in the middle of the higher angle, you need to check with the other seriescollections, that the data label is not above one of other seriescollections line... - didn't reach this part.
and still I am not sure that's it...
Is anybody got something prepared? or someone wants to help me with it?
It is way over my level right now...
"Best fit" is a setting unique to pie chart data labels.
You have the option of positioning a line chart's data labels centered (directly on a point), as well as above, below, left of, and right of the point. You can also position the data label anywhere by changing the .left and .top properties of the label. Left and Top are in points with respect to the top left corner of the chart, so you will have to brush up on your algebra to fine tune label positioning.
As with all else involving charts, Keep It Simple is sound advice. Do you need to label everything, or can you get away with a few key labels?
So after some tries, I decided to ditch the idea since this's way too complicated for me.
What I can say is that I ditch it after I stepped up a little bit.
I could find the best position for each label only when there's one line.
I achieved it by calculating the bigger arc (assumed each point is the middle of a circle), and than put it in the middle of that arc.
to do it when you have more than one line, you have to consider the position of the points of the other line/s. Therefore it becomes much more complicated and this is the reason I decided to ditch it.

Resources