Are you able to share your whole code? On Wednesday, July 30, 2025 at 8:10:15 AM UTC-7 Gavin Dundee wrote:
> It really doesn't work. I truly am puzzled by this. I am a newbie to > this though. > > On Wednesday, July 30, 2025 at 9:47:55 AM UTC-5 Alvin Galit wrote: > >> [0,1, 2] doesn't work? Index starts at [0] and since you have 3 columns, >> I thought maybe that should be working. >> It makes sense that [0, 1, 3] doesn't work because you only have 3 >> columns and so the 3rd column is at index [2]. >> >> On Wednesday, July 30, 2025 at 7:33:55 AM UTC-7 Gavin Dundee wrote: >> >>> With array inputs: >>> [0,1,2] >>> or >>> [0,1,3] >>> >>> I usually get an error like this: >>> Invalid column index 3. Should be an integer in the range [0-2]. >>> >>> If I set the array to: >>> [0,1,2,3] >>> I get all three columns per row. >>> >>> I am still at a loss. Any help would be greatly appreciated! :) >>> >>> On Tuesday, July 29, 2025 at 5:02:11 PM UTC-5 Gavin Dundee wrote: >>> >>>> I am seeking help. Here is my datatable setup: >>>> var grouped_data = google.visualization.data.group( >>>> proxyDataTable, >>>> [yearIndex], >>>> [ >>>> {'column': sschIndex, 'aggregation': google.visualization.data. >>>> sum, 'type':'number'}, >>>> {'column': enrollmentsIndex, 'aggregation': google.visualization. >>>> data.sum, 'type':'number'}, >>>> {'column': crnIndex, 'aggregation': google.visualization.data. >>>> count, 'type':'number'} >>>> ] >>>> ); >>>> >>>> Now I am creating a view: >>>> var view = new google.visualization.DataView(grouped_data); >>>> >>>> Then I draw the view: >>>> view.setColumns([[0,1],[0,1],[0,1]]); >>>> chart0.setDataTable(view); >>>> chart0.draw(); >>>> >>>> My issue is with setColumns(). There are 3 columns being displayed. I >>>> thought I would be able to use this code: >>>> view.setColumns([1,2]); >>>> To display only columns 1 and 2 and not show column 3. My assumption >>>> is that [1,2,3] would show all the columns, but that does not work either. >>>> >>>> I am not sure where to go from here I have tried setColumns with many >>>> different arrays, but I am just guessing at this point. Can anyone help >>>> determine how I could hide a column using setColumns? >>>> >>>> I attached a screenshot of what my chart looks like. >>>> >>>> Thanks in advance for any help!! >>>> >>> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/google-visualization-api/635b442d-b0c9-4fd6-926f-f60baa35b59an%40googlegroups.com.