Get legend in right spot

I've got a table of numbers in the middle of a large spreadsheet. From that table of numbers I get the data to make a bar chart showing data I want. I want to add another column. That is easy enough. I hit the Edit Data Reference button under the chart. Then I highlight the rows of data I want to add (purple in the image below). The problem is Numbers puts the purple circle at the very top of column, not immediately above the selected data, which has the legend identifier (2018). How do I move the purple circle down to just above the data, so the legend has a table (2018 in this case)?


Posted on May 18, 2019 4:05 PM

Reply
Question marked as Top-ranking reply

Posted on May 18, 2019 9:38 PM

HI DRR,


You are following an MS Excel model, where your spreadsheet consists of an immense ocean of cells with island of data scattered here and there.


Numbers is designed around individual tables, placed onto a sheet. The table locations are independent of each other and of any (not visible) grid of cells covering the whole sheet.


Make an independent table containing eleven columns and 14 rows.

Convert column A to a Header column. Enter the names of the months in cells A2 through A13.

Convert row 1 to a header row.. Enter the years in row 1 of columns B through K.

Convert row 14 to a Footer row. Enter the formula =SUM(B) in cell B14, then fill that formula right to cell K14.


When you make a bra chart using this information, Numbers will get the legend labels from the Header row of the appropriate column(s).


For examples and some further explaination, open the Charting Basics template and study the charts there, with particular attention to the arrangement of the chart in terms of the table containing the data and any formulas you can see that might give you some insight to the relationship between the data layout and the appearance of the final chart.


Regards,

Narry


10 replies
Question marked as Top-ranking reply

May 18, 2019 9:38 PM in response to DesertRatR

HI DRR,


You are following an MS Excel model, where your spreadsheet consists of an immense ocean of cells with island of data scattered here and there.


Numbers is designed around individual tables, placed onto a sheet. The table locations are independent of each other and of any (not visible) grid of cells covering the whole sheet.


Make an independent table containing eleven columns and 14 rows.

Convert column A to a Header column. Enter the names of the months in cells A2 through A13.

Convert row 1 to a header row.. Enter the years in row 1 of columns B through K.

Convert row 14 to a Footer row. Enter the formula =SUM(B) in cell B14, then fill that formula right to cell K14.


When you make a bra chart using this information, Numbers will get the legend labels from the Header row of the appropriate column(s).


For examples and some further explaination, open the Charting Basics template and study the charts there, with particular attention to the arrangement of the chart in terms of the table containing the data and any formulas you can see that might give you some insight to the relationship between the data layout and the appearance of the final chart.


Regards,

Narry


May 19, 2019 8:13 AM in response to DesertRatR

Hi DRR,


You wrote: "… to Excel. It really is intuitive…"

Only if your definition of "intuitive" is "what I'm used to doing" Your expansion on this in your reply to SGIII comes closer: "Charting in Numbers is very non-intuitive to those bred under Excel."


To particulars:

"So how did I make the original chart without any headers about this little block of numbers?"

I suspect you didn't. Numbers '09 (or Numbers '08) translated the Excel file into a Numbers document when you first imported it, and was able to interpret the table embedded in the Excel document as the source of a bar chart, including the labels. But, as indicated by what you describe as happening on your attempt to add a new column to the chart, that translation (or the translation into a post '09 version of Numbers) was not capable of supporting an extension of the table.


To extract that embedded table and place it as a separate table (on a second sheet, if desired):


(assumes J45 is the cell above "January" and left of "2014", and the lower right corner of the data block is T58, containing $1216.33)

  • Click once on J45 to select it.
  • Press the shift key and click on T58 to extend the selection to the entire data block.
  • Copy.
  • Click once in a blank area of the Sheet on which you want to place the table.
  • Paste.
  • Click in cell A1 of the new table
    • Place the pointer near the row reference tab for row 1, click the v between the row and the table, and choose Convert to Header Row.
    • Place the pointer in the column reference tab for column A, near the right end of the tab, click the v that appears, and choose Convert to Header column.
    • IF you want to include "Electric Cost" in a row in the table, press option-up arrow to add a new (header) row above the current row 1.

Recreate the bar chart using this table.


Regards,

Barry

May 19, 2019 4:44 AM in response to DesertRatR

Excel is a very good app on the Mac. So if you're comfortable making charts in Excel and have to do it often you may be better off with Excel. However, making charts in Numbers, though it takes experimentation, is not too difficult. Recommend having a look at the 'Charting Basics' template at File > New in your menu to see examples of the Numbers approach to charts.


SG

May 19, 2019 6:44 AM in response to SGIII

About 3 years ago I began transitioning from Excel to Numbers, and now have lots of spreadsheets in Numbers format. Charting in Numbers is very non-intuitive to those bred under Excel. So now I am in that ambiguous netherworld between the two tools. Continuing in Numbers but plotting in Excel is a non-starter: it's going to be one or the other. The problem I have here is this spreadsheet was started in 2010 in Excel, and then eventually ported to Numbers. It is certainly not in the format Numbers is expecting for plotting.


In this case I can't figure out how I made the chart below from the data posted above (it was likely in early 2018 when I made it). There are no headers, or other things Numbers is expecting, in the spreadsheet. I seem to recall posting in this forum asking for help in making the plot, and some kind soul walked me thru the process, when the data isn't in the format Numbers is expecting. Unfortunately when Apple "updated" this forum a couple of months ago, exactly zero of my old posts are available, so I can't even track down the recipe I was given.


May 19, 2019 4:28 PM in response to Barry

Barry, I think I am starting to get this. In essence, on the same sheet with the rest of the data I have a second table. And that table I can set up the headers to recreate the chart.


Just one question. The data in the table I am copying references other cells in the first table. They update, so that reference is incorrect. How do I do the paste without the update, i.e. the old P45 references B45, and so on. Numbers paste isn't like Excel with a lot of options to maintain connectivity. Or am I missing it.

May 19, 2019 5:55 PM in response to DesertRatR

Have you had a chance to look at the examples in the 'Charting Basics' template at File > New in your menu as I suggested above?


Keep in mind that in Excel you do not have to have one big sheet with data spread out in different places, though legacy documents sometimes are structured that way.


In fact, you are often better off using Excel Tables in Excel. (Yes, Excel has tables too, though they're not as easy to use as Numbers tables, and they are not mandatory, as they are in Numbers.)


If you open an Excel document in Numbers and find that things are scattered about, rather than compact and simple as in the template, then usually you will save yourself a lot of frustration and time by rebuilding charts in Numbers the Numbers way rather than trying to make do with, and rejigger, an imported Excel chart.


SG



May 18, 2019 9:53 PM in response to Barry

Somehow (don't recall how ... long ago) I made the bar chart from the data shown in the image (Its on a separate sheet). I was trying to add a fourth bar: I expanded the table and plugged in the numbers. When I go to the chart, and click the Edit Data Reference, and select the 12 new cells, they appear just fine in the chart. The purple circle goes up top, rather than the cell with '2018', which of course makes the legend blank. So how did I make the original chart without any headers about this little block of numbers? The only header in the entire sheet are Rows 1 & 2. Column A is not a header. And my data block starts in Column J and Row 45.


Maybe I need to give up on Numbers and go back to Excel. It really is intuitive ... despite the price.

May 19, 2019 5:52 PM in response to DesertRatR

How to proceed depends on how the original data is laid out.


You said: "The old (cell) P45 references B45 and so on."

A lot depends on the details of 'and so on.'


Assuming my description of the 'data block' is correct, P45 would display '2014', and contain a formula consisting of only a cell reference to cell B45. In the new table, Cell P45 becomes cell G2, and the cell reference in the formula adjusts to a (non existing) cell nine columns to the left of B45. That cell reference should still be to B5 on 'Table 1' (the old table).


If Q45 (original location) references C45, R45 references D45, etc., the easiest solution is to reconstruct the new small table, making cell references in the relocated cells pointing to the same cells as they did before, and remembering include the table name when the referenced cell is on the part of the old table not copied to the new table.


Easier than it sounds, but detailed descriptions require more information regarding where the new table is to pick up each datum.


Regards,

Barry


"Barry, never mind the paste question."


Oops! Too late for that. :-)


I happened to see the notification of your post about 2 minutes after you posted, and started the answer above shortly after that. Was just finishing my closing when I saw the Solved notice flash by, so sent it.


B

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Get legend in right spot

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.