Hi I have created an XY scatterchart from a excel spreadsheet within a c# application but cannot find the right interop commands to set minimum value of the horizontal (X axis). I have found out how to change the Y axis (Primary or Secondary) but can find no clue as to how to set the X axis. For charts where you want to specify an X-axis range of numbers, you first need to switch to a scatter chart and then select the range. Selecting a separate X-axis range lets you use data from anywhere in your workbook.
To change the stacking order for series in charts under Excel for Mac 2011:. select the chart,.
select the series (easiest under RibbonChart LayoutCurrent Selection),. click Chart LayoutFormat Selection or MenuFormatData Series,.
on popup menu Format Data Series click Order, then click individual series and click Move Up or Move Down buttons to adjust the stacking order on the Axis for the subject series. This changes the order for the plot and for the legend, but may not change the order number in the Series formula.
I had a three series plot on the secondary axis, and the series I wanted on top was stuck on the bottom in defiance of the Move Up and Move Down buttons. It happened to be formatted as markers only. I inserted a line, and presto(!), I could change its order in the plot.
Later I could remove the line and sometimes it could still be ordered, but sometimes not. Excel 2010 - if you're looking to reorder the series on a pivot chart:.
go to your underlying pivot table. right-click on one of the Column Labels for the series you're looking to adjust (Note: you need to click on one of the series headings (i.e.
'Saturday' or 'Sunday' in the example shown below) not the 'Column Labels' text itself). in the pop-up menu, hover over 'Move' and then select an option from the resulting sub-menu to reposition the series variable. your pivot chart will update itself accordingly.
This function gets the series names, puts them into an array, sorts the array and based on that defines the plotting order which will give the desired output. Function IncreasingLegendSort(mychart As Chart) Dim Arr ReDim Arr(1 To mychart.FullSeriesCollection.Count) 'Assigning Series names to an array For i = LBound(Arr) To UBound(Arr) Arr(i) = mychart.FullSeriesCollection(i).Name Next i 'Bubble-Sort (Sort the array in increasing order) For r1 = LBound(Arr) To UBound(Arr) rval = Arr(r1) For r2 = LBound(Arr) To UBound(Arr) If Arr(r2) rval Then 'Change ' to '.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |