Charts in spreadsheet gear

656 Views Asked by At

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

1

There are 1 best solutions below

0
On

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.