I have a stacked bar chart and trying to determine if it is possible to get a target line on the chart without using the XY scatter method?
I have a stacked bar chart and trying to determine if it is possible to get a target line on the chart without using the XY scatter method?
Just change the target series to a line
A sample data spreadSheet would help , see yellow banner
I have made a quick example here
Wayne
if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here
If you have a solution to your thread - Please mark your thread solved do the following: >
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
I should have specified "horizontal" stacked bar chart.
For some reason just changing it to a line in the horizontal stacked bar chart will not work, or least I can't get it to work.
I can get the XY scatter method to work but I have 19 charts and when I copy then go back to change and select data I have to go through the whole drill of adding a series for the xy scatter to work.
Last edited by itr674; 05-16-2020 at 06:28 PM. Reason: Add Chart
The problem of using a line series is 2 fold.
line series are normal categorical, so a target of non integer value will be difficult
line series progress across the chart rather than plot specific values like a xy scatter. So under normal circumstances the first point is on the left and the second point on the right of a slope between the two points.
You could use Y error bar to provide a vertical line at a given category but trying to keep the horizontal category axis used by the line and the numeric horizontal axis used by the stacked bars will be very difficult.
If you can use VBA you could use the vertical axis line. The VBA would be to position it when the value changes.
There is a UDF (UserDefinedFunction) in F1.
Andy Pope--thank you. I thought it might take a VBA solution. I will see how this works., and thanks again.
FYI, the VBA is only required to update the chart automatically rather than actually implement the line.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks