Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-08-18 Thread beginnerGG
Hello Daniel, thank you very much! I now have a intermediate solution, that looks ok. Just, the fact, that one can scroll into negative time line area left of the vertical zero-startpoint-line, where no mesurement results (y-values) exist, is a little bit irritating. Is there an option to

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-28 Thread 'Daniel LaLiberte' via Google Visualization API
Your ticks option is now an array in an array. You said: hAxis: {ticks: [ticksArray]} but since the value in ticksArray is an array, that is equivalent to: hAxis: {ticks: [[{v: 1, f: '26.11.15'}, {v: 2, f: '09.12.15'}, {v: 3, f: '22.12.15'}, ...]] } So you should have said: hAxis:

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-28 Thread beginnerGG
Ok I will look deeper into php arrays. Meanwhile my explorer and ticks does not work anymore and I can not find a reason: I just get all the values on the y-axis and 1,2,3,...20 on the x-axis, but it is not scrollable anymore and does not show the f-ticks. function drawChart() { var

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-24 Thread 'Daniel LaLiberte' via Google Visualization API
What you need for the ticks option is an array of values or objects. [{"v":1,"f":"26.11.15"},{"v":2,"f":"09.12.15"}, ..., 5, 6, 7] I don't know enough about PHP to help you with how to do that, though I am sure it is possible. A DataView gets data from a DataTable (or another DataView), but it

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-24 Thread beginnerGG
Thank you very much. I am sorry, but I have some more beginners problems with this: 1. Does this array have one or two dimensions? I get this: Array ( [0] => Array ( [v] => 1 [f] => 26.11.15 ) [1] => Array ( [v] => 2 [f] => 09.12.15 ) or this:

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-20 Thread 'Daniel LaLiberte' via Google Visualization API
The ticks option value is an array of ticks. What you have now is an array of one string (that contains all the elements). Just do this instead: var ticksArray = [{v: 1, f: '26.11.15'}, {v: 2, f: '09.12.15'}, {v: 3, f: '22.12.15'}, {v: 4, f: '13.01.16'}, {v: 5, f: '27.01.16'}, {v: 6, f:

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-19 Thread beginnerGG
Dear Daniel, 1. Do you mean, that I either can use a JS-loop *or* a DataView method? I also thought of a JS-loop, but I do not know if I can simply use it between the brackets of the ticks option? 2. Also with the DataView method it seams, that I have to use a loop additionally. Also it seams,

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-18 Thread 'Daniel LaLiberte' via Google Visualization API
If you want to automatically fill the endless row of tick values and formats, you'd have to write a loop in JavaScript to do that. Or if you want your date values to come from your database, where they end up in your DataTable, you could pull them out to generate the formatted representation, and

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-18 Thread beginnerGG
Thanks very much! The explorer mode works also with the ticks option. Nevertheless is there any method to automatically fill the endless row "[ {v: 1, f: '14.04.16'}, {v: 2, f: '11.05.16'}, {v: 3, f: '04.08.16'}, {v: 4, f: '07.09.16'}, ...] ? I have all the data (y-axiy mesurement values,

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-12 Thread 'Daniel LaLiberte' via Google Visualization API
First, to make the chart be scrollable with the explorer mode, the values must be continuous. This is a current limitation because the code assumes that if you use discrete values (which are strings only, by the way) then you want to see all of them, so scrolling is disabled. This might be

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-07-12 Thread beginnerGG
Dear Daniel, thank you very much. I tried the recommended hAxis.ticks option in different ways. To explain what I want to achieve, I set the horizontal axis

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-05-31 Thread 'Daniel LaLiberte' via Google Visualization API
You can specify the formatted representation of each data value in a couple different ways. * You can compute the format for each value in a column using a formatter. https://developers.google.com/chart/interactive/docs/reference#formatters * You can provide an 'f' value for each 'v' value in

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-05-31 Thread beginnerGG
Hello Daniel, thanks. I can use a row counter instead of the actual date and time of the measurement value to make explorer mode also in the x-axis-direction. But then I need a possibility to overwrite the continuous values shown in the graph with the actual date and time of the measurement,

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-05-16 Thread 'Daniel LaLiberte' via Google Visualization API
I'm not sure this applies to your case, but the explore mode does not work yet for an axis with discrete values. If you convert the values to continuous values (numbers of dates) then explore mode will work. On Tue, May 16, 2017 at 3:21 PM, beginnerGG wrote: > Corrected: > >

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-05-16 Thread beginnerGG
Corrected: Am Dienstag, 16. Mai 2017 14:58:29 UTC+2 schrieb beginnerGG: > > Dear Sergey, > > with the following code I can only scroll vertical (the scale of the > y-axis changes). But I am looking for a possibility to scroll horizontal > (changing the scale of the x-axis and sliding the window

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2017-05-16 Thread beginnerGG
Dear Sergey, with the following code I can scroll vertical (the scale of the y-axis changes). But I am looking for a possibility to scroll horizionally (changing the scale of the x-axis and sliding the window over different visible times), as the number of values along the x-axis is increasing

Re: [visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2016-02-29 Thread 'Sergey Grabkovsky' via Google Visualization API
The "explorer" option is what will provide the "drag-to-move" functionality. You can find the documentation for how to use explorer mode on the page of any chart that supports it, for example the line chart . Here's a simple

[visualization-api] Re: automatic adaption of the width of the graph area depending on the amount of data points

2016-02-26 Thread beginnerGG
Dear Sergey, thank you for your answer. Drag-to-move would probably be nice, if I can fix the legend and the y-axis with that, while the oldest data is hidden, if there are more than e.g. 5 values in the graph. But I do not understand, why I have to analyze the range of my data therefore? I