Charts in spreadsheet gear - spreadsheetgear

I have created a chart that references table as a source .I need to delete some rows in a table after chart is plotted and leaving the chart unchanged. Is it possible to do that?
-Raghu

While actually deleting data that a chart depends on isn’t really possible, you could probably go about this a number of other ways.
You could place the cell data that your chart depends on in another
worksheet separate from the chart, then hide this "data sheet" by
setting its ISheet.Visible property to SheetVisibility.Hidden or
SheetVisibility.VeryHidden.
If you require your chart and data to reside on the same sheet, you
could hide the rows or columns that your data resides on by setting
IRange.Hidden to true for those rows or columns. By default, a
newly-created chart will not plot points that are in hidden rows or
columns, so you would also need to set IChart.PlotVisibleOnly to
false for the chart to take these hidden cell values into account.

Related

Hide some Legend Items in Line Chart

I have my line chart showing all the data properly, including some annotated values which are meant to act as the label in the last data point for the lines. I wanted to do it this way so that I don't have to show literally every data label for every data point.
I have everything working correctly, but I noticed I am unable to remove the annotated legend item without removing the series. By removing the series, I lose the label. Below is my chart.
As you can see, the last data points are working as labels (1092 for example). The problem is you can also see each annotated item in the legend (the colored dashes with no text next to them). How can I only show the legend items for Gained (green), Lost (red), Net (gained - lost) (yellow), and Total (blue), without the other dashes? Is this doable?
I am also open to seeing if there is another way to have only the last data point have a data label in Google Sheets. I was just working off of this tutorial.
Below is a screenshot of some of my data rows in an accompanying sheet.
as long as the annotation column is specified as 'Label' for the primary column you shouldn't be seeing the former in legend

How do you create charts using different sets of data of the same table?

I've never used google sheets in my life and I'm trying to make different charts from different sets of data from the same table. For example I have the following table:
and i would like to make a chart using this set of data:
and then make another chart from this set of data:
but as you can see, doing it in this way it also gives me the data of the previous days.
Selecting only the numbers without the first row it doesn't give me the correct legend. How can I make charts using the same header but different sets of data?
In the Chart editor, set the data range to A1:D1,A4:D and choose Combine ranges vertically.
Alternatively, Insert > Sheet and use a filter() or query() formula in the new sheet to pick the rows you want to plot. Then insert a chart based on the data in the new sheet.

Keep cell reference constant in chart with google sheets?

I've tried to use the '$' in the data range for a chart, but when I add an additional column, it changes the cells the chart is referring to to the original column.
Everyday I add a column of data to a sheet. I just want the chart to keep referring to that newest column of data instead of referring to the previous day's column of data.
try this formula and create chart from there:
={INDIRECT("DF!D39:D41"), INDIRECT("DF!"&
ADDRESS(39, MATCH(MAX(DF!1:1), DF!1:1, 0))&":"&
ADDRESS(41, MATCH(MAX(DF!1:1), DF!1:1, 0)))}
Do not ad $ Mark and keep adding the columns to the left no to the Right or in between.
I tried on a chart and it works.

How do I dynamically expand the range of rows/columns to which a chart takes the data from?

I have the below pivot table, and i created the chart only with the data inside the table, excluding the bottom line with the totals and the right column with the grand total. If new rows automatically appear, how can I make sure they autimatically get added to the chart without having to add the bottom line as well?
best option would be to use FILTER or QUERY formula on separate sheet or hidden columns to trim down your pivoted output and feed it to chart because charts do not support advanced formulae as an input

Graphing Dynamic Line Graphs for ComboGraph Excel 2010

I want to create a combo chart with 2 line graphs. One of them is sourced from a pivot table in another worksheet and another is a horizontal line which may be
adjusted.(Think of equation y = 500.) How can I graph the second graph?
The circled number is horizontal graph (y = 18879.00) and it can change. How can
I graph the dynamic horizontal graph?
If you want to keep using a pivot chart, you can create a Calculated Field with the value of the line, add that to the chart and format the series as a line. With this technique, the line will not be dynamic and you will need to change the calculated field value when you want to move the line.
If you want the line to be dynamically linked to data in a cell, then you can't use a pivot chart. You'll need to create a regular chart from the pivot table data and add the line as a new data series. There are several techniques how to achieve that. The screenshot shows how the line can be plotted by having one value for the first and the last data point each. Cells H3 and H14 both point to H18, where the line value can be changed in one cell.
Add the data in H3:H14 as a new series and format as a line. If the line does not show, make sure to set the option for "Hidden and empty cells" to connect data points with line.

Resources