Hi Alban, I'll forward your question to the folks who work on the ChartEditor, which is more in the realm of Google Spreadsheets.
But one thing I can help with is that the chartEditor.getChartWrapper() call creates a clone of the ChartWrapper each time you call it, which is a bit surprising, and is probably causing the problem you are seeing. Try just calling it once and setting options and drawing from that one copy. On Wed, Aug 19, 2015 at 10:55 AM, Alban Hertroys <[email protected]> wrote: > We have a number of charts, all with continuous X-axes. Currently we're > looking into making these charts editable using the ChartEditor class. > The editor works, but there are a few issues. > > First our most relevant concern: Our continuous x-axis is read from the > first column of a DataTable. This results in incorrect output upon opening > the ChartEditor, it handles the first data-column just the same as any > other data-column: as a column of data-values to plot on the y-axis. > > To work around this, we have to check the option "Use 1st column as > labels" each time that we open the chart editor. Is there a way to have > that set by default? > I couldn't find anything in the API documentation pointing in that > direction. > > Secondly, after editing and pressing OK, the charts resize to a much > smaller size than what we started on. > I managed to work around that problem by storing the chart wrapper > dimensions (width & height) in a variable and then re-applying those values > again when handling the 'ok' event of the ChartEditor, with these lines: > chartEditor.getChartWrapper().setOptions({width: 900, height: 700}); > chartEditor.getChartWrapper().draw(); > > That doesn't look like that's how it's supposed to work. Am I missing > something? > > Regards, > > Alban. > > -- > 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 [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-visualization-api/e1e1f7f6-519c-4b96-bc3f-aaaea7e8e47c%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/e1e1f7f6-519c-4b96-bc3f-aaaea7e8e47c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJMHoJrOCrKrhFWL5DL9wTQ90XxPYyP8ti4fwBLh9zr0LA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
