I have multiple lines in a Spotfire line chart visualization. How can I add a Median Line of those lines. I wish to avoid adding a Calculated Column. I've tried Lines & Curves but I may have overlooked something.
Lines and curves would be where you'd do it at.
Right Click > Properties > Lines & Curves > Add > Horizontal Line > Straight Line...
Then, just change the aggregated value to Median for the column you are aggregating.
Also, after you click ok, scroll down and there is an option for One per: which you can make one line for all of the data, or a median for each line, or for each trellis panel
Related
I want to create a line chart from a table where I do no have all the data.
Moreover, I need that the x-axis uses the values in the first row, which are not continue. This table shows a short part of the whole data:
The first row is the x-axis and the remaining rows correspond to the lines in the chart.
How should I proceed in order to ignore the gaps, and each line was drawn taking only into account the available data?
To ignore gaps and create a continuous line
Right Click Chart > Click 'Hidden and Empty Cells' > Select Option 'Connect Data points with line'
In Spotfire, I am trying to draw three horizontal curves from columns in a different data table than my plot. These lines are supposed to be target lines. I know I can do this either in a combination chart or in Lines & Curves in properties.
However, I prefer not to do it in a combination chart as I have to add colouring and I get many distinct series when I add colouring to three different target lines.
So I tried doing this by adding a horizontal line in "Add > Horizontal Line > Line From Data Table". However instead of drawing a curve what this does is draw multiple horizontal lines for the slightly fluctuating values in this column. I have also tried other options in Lines & Curves but none seem to work. And this happens although I have matchedthe data tables.
Does anyone have an idea how I can draw these target lines while avoiding the situation linked below?
The situation now:
The red, purple and black lines are supposed to be 3 seperate lines.
I think you are very close. Try the Properties > Lines and Curves and then Add > Line From Column Values. You will need to specify the x and y axis from the data table.
This will not always work on a bar chart, as the x may not line up with your category axis on the bar chart. Your x-axis for the line will need to be the same as the category axis.
I have a combo chart in excel, with clustered bar charts (for a box plot) and lines. I am trying to display the bar charts/box plot in front of the lines, but am able to do so.
I tried moving the bar charts to the top and/or bottom in "select data" - but no change.
Any suggestions?
Am using Excel 2013.
Thanks!
I believe it is not possible. You can change display ordering of Excel series by:
changing the plot order of the series (this is what you have done in the "Select data" dialog),
changing the axis on which the series are displayed (series on secondary axis are displayed over the series on the primary axis).
But from my experiments no combination of changes makes the lines appear behind the columns.
There are two workarounds that might or might not help you:
you can create two charts on top of each other and put the chart with the lines behind the one with the columns,
or you could create a line chart (most likely you would need scatter chart), that is not a single line but a series of segments where the columns are not shown (this one is not that easy to do)
What are the lines for? If you are just trying to identify some zones along the value axis, you could instead use stacked areas, which would give a banded appearance. Areas are always drawn behind bars and columns, while lines are always drawn in front of lines and columns.
In Excel 2007 I have a chart with a horizontal line (data series) similiar to what this page shows. But, as you notice, the line starts and ends in the middle of the data point. So, if there are bars on the same chart, the horizontal line will not extend to cover the entire first and last bars. How can I extend the horizontal line to touch the chart edges on the left and right sides?
I tried putting in "dummy" points at the beginning and end of the data series that had zero values (for the bars). This looked good, but the x-axis numbering started at zero and ended at one more than my last real data point, which, in my case is unacceptable.
Oh, and I'm creating the charts in VBA, so I need a VBA solution (which may be the same as the manual solution, just coded). Thanks.
If you right click on the horizontal axis and go into axis options. At the very bottom under Position Axis: select "On Tick Marks"
I answered a similar questions here:
Bar and Line charts are not synced when in the same chart area
In the above question the user needed to move the line to the left, but you can do a similar thing for your case.
Use scatter chart for your line chart. Then you need to set the xvalues of the scatter chart to be a bit different than the ones for your column chart. So let's say that your x-axis numbering goes from 1 to 12. Then you should distribute your xvalues for scatter chart from 0.8 to 12.2. That moves the starting point a bit to the left (0.8 instead of 1) and the last point a bit to the right (12.2 instead of 12). The exact number that you should use will depend on your gap and overlap settings of the column chart.
I eventually found an answer here. This worked great for me and did exactly what I needed.
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.