well, I have it only locally.... but the link is like this http://chart.apis.google.com/chart?cht=lc&chs=600x120&chd=s:_CCEAJBECJAAA&chxt=x,y&chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|1:|0|2|4|6|8|10|12&chxp=0,10,20,30,40,50,60,70,80,90,100,110,120|1,0,2,4,6,8,10,12&chxr=1,0,12&chxs=
On Jul 25, 4:47 pm, Elijah Gregory <[email protected]> wrote: > You're using Visualizations to create a Chart. Can you provide a link > to the visualization embedded in a webpage so we can see the result of > your current code? > > Just off the top of my head I would try fiddling with your > bottomAxis.AddLabel calls. You pass 13 data points in and 120/13 != > 10, so maybe that is the problem? > > On Sat, Jul 25, 2009 at 9:21 AM, Diego<[email protected]> wrote: > > > Hello! I'm starting out with this API and looks goooooood. > > > I can't align the data values to the month bottom axis. Is there a > > paramenter that I'm missing... > > Here is my code: > > > // Specify chart width and height in pixels > > LineChart chart = new LineChart(600, 120); > > > ChartAxis bottomAxis = new ChartAxis(ChartAxisType.Bottom); > > bottomAxis.AddLabel(new ChartAxisLabel("Jan", 10)); > > bottomAxis.AddLabel(new ChartAxisLabel("Feb", 20)); > > bottomAxis.AddLabel(new ChartAxisLabel("Mar", 30)); > > bottomAxis.AddLabel(new ChartAxisLabel("Apr", 40)); > > bottomAxis.AddLabel(new ChartAxisLabel("May", 50)); > > bottomAxis.AddLabel(new ChartAxisLabel("Jun", 60)); > > bottomAxis.AddLabel(new ChartAxisLabel("Jul", 70)); > > bottomAxis.AddLabel(new ChartAxisLabel("Aug", 80)); > > bottomAxis.AddLabel(new ChartAxisLabel("Sep", 90)); > > bottomAxis.AddLabel(new ChartAxisLabel("Oct", 100)); > > bottomAxis.AddLabel(new ChartAxisLabel("Nov", 110)); > > bottomAxis.AddLabel(new ChartAxisLabel("Dec", 120)); > > bottomAxis.FontSize = 14; > > chart.AddAxis(bottomAxis); > > > ChartAxis leftAxis = new ChartAxis(ChartAxisType.Left); > > leftAxis.SetRange(0, 12); > > leftAxis.AddLabel(new ChartAxisLabel("0", 0)); > > leftAxis.AddLabel(new ChartAxisLabel("2", 2)); > > leftAxis.AddLabel(new ChartAxisLabel("4", 4)); > > leftAxis.AddLabel(new ChartAxisLabel("6", 6)); > > leftAxis.AddLabel(new ChartAxisLabel("8", 8)); > > leftAxis.AddLabel(new ChartAxisLabel("10", 10)); > > leftAxis.AddLabel(new ChartAxisLabel("12", 12)); > > chart.AddAxis(leftAxis); > > > // I added the -1 so it starts on january > > int[] theData = { -1, 2, 2, 4, 0, 9, 1 ,4, 2, 9, 0, 0, 0 }; > > // SetData will accept int[] and float[] for single data sets > > chart.SetData(theData); > > > Thanks!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Chart API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-chart-api?hl=en -~----------~----~----~----~------~----~------~--~---
