0

I am using Google's chart API to create some graphs. Things were working fine until my data set starting growing. I've narrowed the problem down to what seems to be a limit on the URI string length. Can someone confirm if this is the case. Also is there a good way to get around this limitation?

Edit with some more details: The length of the url is only about 1000 characters long when it starts causing my app to crash. I have taken the url that caused the crash and opened up the graph on a browser just fine. Is there a hard limit on what can be set for the Source property of an Image?

Examples:

URL that Works (980 characters) - https://chart.googleapis.com/chart?chs=325x360&chf=bg,s,55555500|c,s,55555500&chdlp=s&cht=lxy&chco=823B2F,586028,502850&chls=3|3|3&chma=4,4,4,4&chg=10,10,1,0&chm=o,823B2F,0,-1,8|o,586028,1,-1,8|o,502850,2,-1,8&chd=t:2,93.3,93.4,93.5,93.7,93.8,93.8,93.9,94,94,94.1,94.1,94.2,94.2,94.3,94.3,94.4,94.5,94.5,94.6,94.7,94.7,94.8,94.9,94.9,95,95.1,95.1,95.1,95.2,95.2|0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5|2,93.3,93.4,93.5,93.7,93.8,93.8,93.9,94,94,94.1,94.1,94.2,94.2,94.3,94.3,94.4,94.5,94.5,94.6,94.7,94.7,94.8,94.9,94.9,95,95.1,95.1,95.1,95.2,95.2|1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1|2,93.3,93.4,93.5,93.7,93.8,93.8,93.9,94,94,94.1,94.1,94.2,94.2,94.3,94.3,94.4,94.5,94.5,94.6,94.7,94.7,94.8,94.9,94.9,95,95,95,95.1,95.2,96|99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,4

URL that Doesn't Work (981 characters) - https://chart.googleapis.com/chart?chs=325x360&chf=bg,s,55555500|c,s,55555500&chdlp=s&cht=lxy&chco=823B2F,586028,502850&chls=3|3|3&chma=4,4,4,4&chg=10,10,1,0&chm=o,823B2F,0,-1,8|o,586028,1,-1,8|o,502850,2,-1,8&chd=t:2,93.3,93.4,93.5,93.7,93.8,93.8,93.9,94,94,94.1,94.1,94.2,94.2,94.3,94.3,94.4,94.5,94.5,94.6,94.7,94.7,94.8,94.9,94.9,95,95.1,95.1,95.1,95.2,95.2|0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5|2,93.3,93.4,93.5,93.7,93.8,93.8,93.9,94,94,94.1,94.1,94.2,94.2,94.3,94.3,94.4,94.5,94.5,94.6,94.7,94.7,94.8,94.9,94.9,95,95.1,95.1,95.1,95.2,95.2|1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1|2,93.3,93.4,93.5,93.7,93.8,93.8,93.9,94,94,94.1,94.1,94.2,94.2,94.3,94.3,94.4,94.5,94.5,94.6,94.7,94.7,94.8,94.9,94.9,95,95,95,95.1,95.2,96|99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,40

Code that is working with this:

XAML -

<Image Source="{Binding HistoryGraphSource}" Width="330" Height="360" HorizontalAlignment="Left"/>

C# Code -

activeZone.HistoryGraphSource = ...

The DataContext of the page is set to activeZone. All I changed was adding a 0, to the last parameter; changed from 4 to 40.

**Also I know a lot of these values are redundant in my call for the graph. This is just an example.

  • 1
    Check this answer: http://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string – Gusman Aug 06 '14 at 19:04
  • The only limit to the length of a URL string as the src of an `` tag is the length-limit of a URL in general. Can you provide an example URL that works in a browser URL but not an `` tag? – asgallant Aug 07 '14 at 00:43
  • I will add the example in the main text of the question. I'm sorry in advance... they are large blocks of text. – friedliver Aug 07 '14 at 02:16

0 Answers0