Git Product home page Git Product logo

google-visualization-java's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-visualization-java's Issues

Error in Annotated Timeline: "Object Date(...) has no method getTime"

What steps will reproduce the problem?
1. I've created an annotated timeline using a json wire source
2. After the annotatedtimeline.draw method is called, the type error occurs
3. This is the error output from Chrome. Other browsers have slightly different 
error messages.

What is the expected output? What do you see instead?
Expected would be a working timeline chart. Instead, An alert pops up with the 
above error. If I send this exact dataset to a Visualization LineChart, it 
works fine.

What version of the product are you using? On what operating system?
        google.load("visualization", '1', { packages: ['corechart'] });
        google.load('visualization', '1', { packages: ['annotatedtimeline'] });
This is running on Vista and Windows 7, but the same happens on the deployed 
version on a Windows Server.
It fails on Chrome, Firefox, IE, Safari


Please provide any additional information below.
Following is the method that calls the timeline chart. You'll notice that I've 
commented out a call to a LineChart using the same date. The LineChart works 
fine, but the annotated timeline produces the error.

function drawPercentSpentOverTime(gridTableData) {
        try {
            var chartDiv = $("#PercentSpentOverTimeChart").get(0);
            //var timeline = new google.visualization.LineChart(chartDiv);
            var annotatedtimeline = new google.visualization.AnnotatedTimeLine(chartDiv);
            annotatedtimeline.draw(gridTableData,
            {
                fontSize: 10,
                fontName: "Calibri",
                legendFontSize: 12,
                curveType: 'function',
                width: 920,
                hAxis: {title: 'Date', titleTextStyle: {fontSize: 12}},
                vAxis: { title: 'Percent', titleTextStyle: { fontSize: 12} },
                colors: ['#B98332','#FFCC33','#FF9900', '#344368', '#577647', '#871B3C' ]
            });
        }
        catch (e) {
            alert(e);
        }
    }


Below is the Json returned from the server. This was copied directly from 
firebug:

{"status":"ok","reqId":0,"table":{"cols":[{"id":"ActualsDate","label":"Date","ty
pe":"date"},{"id":"PercentSpent","label":"Percent Of Budget 
Spent","type":"number"},{"id":"TimeElapsed","label":"Percent Time 
Elapsed","type":"number"}],"rows":[{"c":[{"v":"Date(2010,7,23)","f":"2010-Aug-23
"},{"v":0.241758227,"f":"0.2 %"},{"v":17.9419537,"f":"17.9 
%"}]},{"c":[{"v":"Date(2010,7,24)","f":"2010-Aug-24"},{"v":0.483516455,"f":"0.5 
%"},{"v":18.2058048,"f":"18.2 
%"}]},{"c":[{"v":"Date(2010,7,25)","f":"2010-Aug-25"},{"v":0.725274742,"f":"0.7 
%"},{"v":18.4696579,"f":"18.5 
%"}]},{"c":[{"v":"Date(2010,7,26)","f":"2010-Aug-26"},{"v":0.9670329,"f":"1.0 
%"},{"v":18.73351,"f":"18.7 
%"}]},{"c":[{"v":"Date(2010,7,27)","f":"2010-Aug-27"},{"v":1.20879126,"f":"1.2 
%"},{"v":18.99736,"f":"19.0 
%"}]},{"c":[{"v":"Date(2010,7,28)","f":"2010-Aug-28"},{"v":1.45054948,"f":"1.5 
%"},{"v":19.2612133,"f":"19.3 
%"}]},{"c":[{"v":"Date(2010,7,29)","f":"2010-Aug-29"},{"v":1.69230771,"f":"1.7 
%"},{"v":19.5250664,"f":"19.5 
%"}]},{"c":[{"v":"Date(2010,7,30)","f":"2010-Aug-30"},{"v":1.98901093,"f":"2.0 
%"},{"v":19.7889175,"f":"19.8 
%"}]},{"c":[{"v":"Date(2010,7,31)","f":"2010-Aug-31"},{"v":2.28571415,"f":"2.3 
%"},{"v":20.05277,"f":"20.1 
%"}]},{"c":[{"v":"Date(2010,8,1)","f":"2010-Sep-01"},{"v":2.58241773,"f":"2.6 
%"},{"v":20.3166237,"f":"20.3 
%"}]},{"c":[{"v":"Date(2010,8,2)","f":"2010-Sep-02"},{"v":2.879121,"f":"2.9 
%"},{"v":20.5804749,"f":"20.6 
%"}]},{"c":[{"v":"Date(2010,8,3)","f":"2010-Sep-03"},{"v":3.17582417,"f":"3.2 
%"},{"v":20.844326,"f":"20.8 
%"}]},{"c":[{"v":"Date(2010,8,4)","f":"2010-Sep-04"},{"v":3.4725275,"f":"3.5 
%"},{"v":21.10818,"f":"21.1 
%"}]},{"c":[{"v":"Date(2010,8,5)","f":"2010-Sep-05"},{"v":3.76923084,"f":"3.8 
%"},{"v":21.3720322,"f":"21.4 
%"}]},{"c":[{"v":"Date(2010,8,6)","f":"2010-Sep-06"},{"v":3.86813164,"f":"3.9 
%"},{"v":21.6358833,"f":"21.6 
%"}]},{"c":[{"v":"Date(2010,8,7)","f":"2010-Sep-07"},{"v":3.967033,"f":"4.0 
%"},{"v":21.8997364,"f":"21.9 
%"}]},{"c":[{"v":"Date(2010,8,8)","f":"2010-Sep-08"},{"v":4.065934,"f":"4.1 
%"},{"v":22.1635876,"f":"22.2 
%"}]},{"c":[{"v":"Date(2010,8,9)","f":"2010-Sep-09"},{"v":4.164835,"f":"4.2 
%"},{"v":22.42744,"f":"22.4 
%"}]},{"c":[{"v":"Date(2010,8,10)","f":"2010-Sep-10"},{"v":4.26373625,"f":"4.3 
%"},{"v":22.6912937,"f":"22.7 
%"}]},{"c":[{"v":"Date(2010,8,11)","f":"2010-Sep-11"},{"v":4.362637,"f":"4.4 
%"},{"v":22.9551449,"f":"23.0 
%"}]},{"c":[{"v":"Date(2010,8,12)","f":"2010-Sep-12"},{"v":4.46153831,"f":"4.5 
%"},{"v":23.218996,"f":"23.2 
%"}]},{"c":[{"v":"Date(2010,8,13)","f":"2010-Sep-13"},{"v":4.53846169,"f":"4.5 
%"},{"v":23.482851,"f":"23.5 
%"}]},{"c":[{"v":"Date(2010,8,14)","f":"2010-Sep-14"},{"v":4.61538458,"f":"4.6 
%"},{"v":23.7467022,"f":"23.7 
%"}]},{"c":[{"v":"Date(2010,8,15)","f":"2010-Sep-15"},{"v":4.692308,"f":"4.7 
%"},{"v":24.0105534,"f":"24.0 
%"}]},{"c":[{"v":"Date(2010,8,16)","f":"2010-Sep-16"},{"v":4.769231,"f":"4.8 
%"},{"v":24.2744064,"f":"24.3 
%"}]},{"c":[{"v":"Date(2010,8,17)","f":"2010-Sep-17"},{"v":4.857143,"f":"4.9 
%"},{"v":24.53826,"f":"24.5 
%"}]},{"c":[{"v":"Date(2010,8,18)","f":"2010-Sep-18"},{"v":4.95604372,"f":"5.0 
%"},{"v":24.80211,"f":"24.8 
%"}]},{"c":[{"v":"Date(2010,8,19)","f":"2010-Sep-19"},{"v":5.054945,"f":"5.1 
%"},{"v":25.0659637,"f":"25.1 
%"}]},{"c":[{"v":"Date(2010,8,20)","f":"2010-Sep-20"},{"v":5.13186836,"f":"5.1 
%"},{"v":25.3298168,"f":"25.3 %"}]}]}}




Original issue reported on code.google.com by [email protected] on 20 Sep 2010 at 4:13

DateValue exception output misleading

What steps will reproduce the problem?
1. Create a new DateValue with any month with 31 days who's following month has 
30 days, setting the day to 31.
2. You get an exception saying wrong date format.
3.

What is the expected output? What do you see instead?
The expected exception would be, for month=3:
Month=3 is April in GregorianCalendar, April has 30 days. March has 31 days.

The exception says: wrong date format YYYY-DD-MM 2010-31-3.
The exception *should* say: wrong date format YYYY-DD-MM 2010-31-4.

It is misleading because the date in March is correct, and the month printed is 
not _month+1_, like in other methods of this DateValuue class.

This exception should also increment the month in it's reporting. 

What version of the product are you using? On what operating system?
data source lib v1.0.2 
2.6.32-22-generic #36-Ubuntu x86_64 GNU/Linux

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 9 Jun 2010 at 3:45

order by column id not working with functions in a select

I have a mySQL table with the following definition:

id: BIGINT
date: DATE
impressions: BIGINT

The query "select toDate(day), sum(impressions) group by day" gives the 
following results:

google.visualization.Query.setResponse({"version":"0.6","status":"ok","sig":"147
1412089","table":{"cols":[{"id":"toDate_day","label":"toDate(day)","type":"date"
,"pattern":""},{"id":"sum-impressions","label":"sum 
impressions","type":"number","pattern":""}],"rows":[{"c":[{"v":new 
Date(2012,0,27)},{"v":1.0}]},{"c":[{"v":new 
Date(2012,0,28)},{"v":1.0}]},{"c":[{"v":new 
Date(2012,0,29)},{"v":1.0}]},{"c":[{"v":new 
Date(2012,0,30)},{"v":1.0}]},{"c":[{"v":new 
Date(2012,1,1)},{"v":1.0}]},{"c":[{"v":new 
Date(2012,1,2)},{"v":1.0}]},{"c":[{"v":new 
Date(2012,1,3)},{"v":1.0}]},{"c":[{"v":new Date(2012,1,4)},{"v":1.0}]}]}});

As you can see it's given the toDate(day) column the id "toDate_day"

However, trying the following query: select toDate(day), sum(impressions) group 
by day order by `toDate_day`

Gives the invalid query error:

Column [`toDate_day`] which appears in ORDER BY, must be in SELECT as well, 
because SELECT contains aggregated columns.

This should order by toDate(day) as you can according to the documentation give 
a column ID in an order by.

I'm using version 1.1.1

Original issue reported on code.google.com by [email protected] on 15 Feb 2012 at 6:30

Need to be able to add blank table values

This is a feature request.

I know that when using annotated timeline on the client, I can leave "blanks" 
within the data table and the visualization will nicely interpolate between 
known values. Unfortunately, when I use this library to create a data table 
servlet in Java, I do not see a way to do this. 

I would like to be able to leave "holes" in my data table. This might be done, 
for example, by adding a "addEmptyCell()" method to TableRow; this would be in 
parallel to the addCell(Value) method.

Original issue reported on code.google.com by [email protected] on 10 Dec 2010 at 5:01

Capability to add a static vertical line on a BarChart

I am proposing you add a feature to be able to add a vertical line at a 
specified point on the horizontal axis on a BarChart.

This would allow to emphasize a given horizontal axis value without having to 
modify grid lines.

I required this feature recently and was unable to achieve the wanted result.

Thanks.

Original issue reported on code.google.com by [email protected] on 15 Nov 2012 at 9:46

JsonRenderer creates malformed JSON

What steps will reproduce the problem?
1. Create data table
2. Use JsonRenderer.renderDataTable
3. Parse with strict JSON library

What is the expected output? What do you see instead?

I get invalid JSON. The keys are unquoted and values are in single quotes.
Keys and values must both be in double quotes.

What version of the product are you using? On what operating system?

1.0.2

Please provide any additional information below.

Even google.gadgets.io.makeRequest errors on the JSON this class produces.

Attached file works better. I think we are still in trouble with the way a
Date is included.

Original issue reported on code.google.com by [email protected] on 9 Sep 2009 at 5:42

Attachments:

java.lang.SecurityException: SHA1 digest error for com/ibm/icu/util/ULocale.class (at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:210)

Hi, 

Iam using a core chart embedded in a jsp calling the datasource coming out of a 
servlet. 

It worked fine locally with Eclipse 3.6 with GAE plugin. But in production GAE 
it gives: 

Uncaught exception from servlet
java.lang.SecurityException: SHA1 digest error for 
com/ibm/icu/util/ULocale.class
    at com.google.appengine.runtime.Request.process-c1a965e156d1a43e(Request.java)
    at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:210)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:218)
    at java.util.jar.JarVerifier.update(JarVerifier.java:205)
    at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:428)
    at sun.misc.Resource.getBytes(Resource.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:273)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at com.google.visualization.datasource.DataSourceHelper.getLocaleFromRequest(Unknown Source)
    at com.google.visualization.datasource.DataSourceRequest.inferLocaleFromRequest(Unknown Source)
    at com.google.visualization.datasource.DataSourceRequest.<init>(Unknown Source)
    at conveyer.controller.InsightServlet.doGet(InsightServlet.java:64)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
    at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
    at java.lang.Thread.run(Thread.java:679)

Original issue reported on code.google.com by [email protected] on 4 Jan 2012 at 2:00

Enhancement

What steps will reproduce the problem?
1.enhance google.visualization.Table to support customized style(color,font) 
for each row/cell.


What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 4 Jul 2012 at 3:05

Servlet graph, the content of element servlet is incomplate

What steps will reproduce the problem?
1.Navigate to visualization-datasource-1.0.2\examples\src\html
2.Look inside web.xml  file.
3.Look graph servlet definition.

What is the expected output? What do you see instead?
Is missing a class definition 
<servlet-class>...</servlet-class>



Current code in web.xml
    <servlet>
      <servlet-name>graph</servlet-name>
      <description>
        This servlet produces GIF images that are dynamically generated
        graphs, based on the input parameters included on the request.
        It is generally mapped to a specific request URI like "/graph".
      </description>
    </servlet>


What version of the product are you using? On what operating system?
visualization-datasource-1.0.2   


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 25 Nov 2009 at 3:47

count(*)

I did not find a better place to post an enhancement to the Google Query 
Language, so I do it here.

A common task in SQL is to count identical values, returning distinct values in 
one column and the count in another. Currently there is no possibility to do it 
on 1 column data source. This could be solved by enhancing count function to 
take "*" as an argument:

select A, count(*) group by A

Original issue reported on code.google.com by [email protected] on 20 Jan 2013 at 5:58

Add a visitor for easily traversing QueryFilter objects

This is to allow non-sql datasources that have sql-like filtering capabilities 
to 
inspect QueryFilters without instanceof checks all over the place.  A patch has 
been included that adds the visitor, adds a simple default implementation for 
extension and rewrites the SqlDataSourceHelper to use the visitor.

Original issue reported on code.google.com by [email protected] on 23 Oct 2009 at 10:24

Attachments:

Timezone is ignore when using Annotated Time Line

What steps will reproduce the problem?
1. Implements a date/time series
2. Implements a annotated timeline

What is the expected output? What do you see instead?
The time line series presents an offset according to the local timezone.
A point at 11:00 am  for a +200 timezone is represents at 09:00 am
the scale seems to ignore the local time zone

What version of the product are you using? On what operating system?
Google Visualization Data Source Library 1.0.2

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 25 Sep 2009 at 12:43

Misspelling of "occured", should be "occurred" in DataSourceHelper.java

What steps will reproduce the problem?
1. An exception is thrown in the validateQueryAgainstColumnStructure method by 
the AggregationColumn validateColumn method.

What is the expected output? What do you see instead?
Expected: "A runtime exception has occurred".  Instead: "A runtime exception 
has occured".

What version of the product are you using? On what operating system?
Version: Revision 70.  OS: N/A.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 15 Oct 2013 at 7:28

Build fails at com\google\visualization\datasource\query\engine\GroupingComparator.java

What steps will reproduce the problem?

I am using visualization-datasource-1.0.2 with dependency google-collect-1.0. 
It gives symbol not found error at line 128 of 
GroupingComparator. The symbol and file is 
com.google.common.collect.Ordering.givenOrder().

I looked at the source in google-collect-1.0 and the Ordering.givenOrder() was 
not present there as reported by the groovyc. 

Strangely, the source in the trunk here on google code had a function 
Ordering.explicit() at that line. The pom mentions it to be 
version 1.0. Its confusing the trunk is reflecting visualization-datasource-1 
because I was expecting latest 1.0.2 here.


What version of the product are you using? On what operating system?
visualization-datasource-1.0.2. Windows.

Please provide any additional information below.
I am building a grails app with the above jar files.

Original issue reported on code.google.com by [email protected] on 20 Feb 2010 at 1:02

Need Joining 2 data tables capability

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 28 Feb 2014 at 7:20

export to HTML double escapes &nbsp

What steps will reproduce the problem?
1. create a data table with null values
2. export to HTML

What is the expected output? What do you see instead?

should see spaces in the html,
but &nbsp is shown instead (double escapes the space).

Please use labels and text to provide additional information.


Original issue reported on code.google.com by [email protected] on 24 Jun 2009 at 8:05

QueryEngine.performSelection() loses any custom table properties

What steps will reproduce the problem?
1. Implement a DataTableGenerator that adds custom table properties with 
Capabilities.NONE
2. Run any query with a select statement
3. Any custom table properties will be gone in the result table

You would expect that the table properties were preserved.

This is due to the construction of a new DataTable instance without copying 
over any custom properties

http://code.google.com/p/google-visualization-java/source/browse/trunk/src/main/
java/com/google/visualization/datasource/query/engine/QueryEngine.java#317 

The fix would be to ensure that in any methods where the QueryEngine breaks the 
chain, and returns a different DataTable instance than the one passed in, the 
custom table properties are copied over into the new DataTable instance.

Original issue reported on code.google.com by [email protected] on 15 Nov 2012 at 7:49

Maven support

Maven is a widely used build/dependency/project management tool in the Java
community.

Those who are unfamiliar with it will benefit from reading the book written
by Sonatype: http://www.sonatype.com/books/maven-book/

For those who are familiar, it is an annoyance to find no maven support
from a library they are interested in using.

It just so happens that all of google-visualization-java's dependencies are
already within the central maven repository. It should be trivial to get
google-visualization-java added as well.

I'll get you started with a patch file against trunk (r7) that, once
applied, will allow you to build the project simply with "mvn package".

(Note: I removed several @Override annotations, as necessary for 1.5
compatibility)

For more information about deployment to a repository, perhaps you could
ask this Googler: http://code.google.com/u/gk5885/

Original issue reported on code.google.com by [email protected] on 5 Jun 2009 at 5:00

Attachments:

Making the only constructor private means the class can't be extended

What steps will reproduce the problem?
1. create a new class to extend SqlDataSourceHelper
2. java needs to be able to construct the class, even if all methods are static
3. that means java must be able to construct the superclass
3. the only available constructor for the superclass is private
4. your extended class will not compile

What is the expected output? What do you see instead?

I'd like a public constructor. O.K., the class has only statics. I could create 
my own class and just call through as necessary, the extension is a signal of 
intention, and ass the superclass changes, a means of enforcing correct 
extension behavior via the compiler.

What version of the product are you using? On what operating system?

1.0.2

Please provide any additional information below.

Should be all you need.

Original issue reported on code.google.com by [email protected] on 11 Jul 2010 at 8:18

Submit 1.1.1 to Maven Central

We'd love to use the latest version (1.1.1) in our projects, but the dependency 
is not currently available in Maven Central.  I see that earlier versions of 
the project have been published there; could the latest release be added?

Original issue reported on code.google.com by [email protected] on 18 Apr 2012 at 7:39

Quote marks used (`) in SqlDataSourceHelper.java don't work with PostgreSQL (8.3.7)

The quote marks used to quote column names (presumably to support multiword
columns in mysql) cause queries to fail on PostgreSQL.   I know that
PostgreSQL is not supported by this module at this time, but correcting the
quote marks is all I've needed to make it work for simple queries.

Additionally, while investigating this, I also noticed that the the error
message returned a) doesn't include the query generated for the SQL server
(making it hard to determine what quoting you need to do on the client
query side) and b) explicitly says "mysql error" instead of a more generic
and meaningful "database server error"

I've attached a patch that uses the right quote marks for PostgreSQL and
returns a more detailed message when an error occurs.

Unfortunately, I don't know if the same quote marks will work with mysql. 
If they do, I'd be thrilled if you could switch to them, otherwise this
information may be useful as you look at broadening support to other
database servers.

Original issue reported on code.google.com by [email protected] on 17 Nov 2009 at 6:02

Attachments:

maven support

Reference 
http://code.google.com/p/google-visualization-java/issues/detail?id=1&can=1&q=ma
ven

1.1.1 does not work with maven.

Original issue reported on code.google.com by [email protected] on 27 Oct 2011 at 9:50

1.1.1 is incompatible with google collection 1.0?

What steps will reproduce the problem?

Code as below:
public void testDataTable() throws TypeMismatchException{
        DataTable dt = new DataTable();
        ColumnDescription columnDescription0 = new ColumnDescription("0", ValueType.TEXT ,"Date");
        ColumnDescription columnDescription1 = new ColumnDescription("1", ValueType.NUMBER ,"new_user");

        dt.addColumn(columnDescription0 );
        dt.addColumn(columnDescription1);

        TableRow tableRow =  new TableRow();
        //Text text =  new Text();
        tableRow.addCell("2012-07-01");
        tableRow.addCell(10.0);

        //Collection<TableRow> rowsToAdd;
        //dt.addRows(tableRow );
        dt.addRow(tableRow);


        CharSequence jsonString = JsonRenderer.renderDataTable(dt, true, false);
        System.out.println("json:"+jsonString.toString());
    }





It threw the exceptions as below

java.lang.NoSuchMethodError: 
com.google.common.collect.ImmutableList.copyOf(Ljava/util/Collection;)Lcom/googl
e/common/collect/ImmutableList;
    at com.google.visualization.datasource.datatable.TableRow.getCells(Unknown Source)
    at com.google.visualization.datasource.datatable.DataTable.addRow(Unknown Source)
    at com.moto.TestGoogleAPI.testDataTable(TestGoogleAPI.java:43)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



If I remove dependency of Google collections library version 1.0., and replace 
it with the latest Guava lib, there is no such issue. Please help take a look 
if the version 1.1.1 is incompatible with 'Google collections library version 
1.0.'


What is the expected output? What do you see instead?
There should no exception.

What version of the product are you using? On what operating system?
Mac OS

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 22 Jul 2012 at 1:43

CSV output does not escape non text values with commas

What steps will reproduce the problem?
1. Open a data source url
2. Add &tqx=out:csv to retrieve the data table output as a CSV file
3. Assuming the data has a non text value with ',' in it the ',' will
not be escaped and the CSV file will be corrupted.

What is the expected output? What do you see instead?
Expected output -  text,"123,345"
Current output - text,123,345


Original issue reported on code.google.com by [email protected] on 6 Jul 2009 at 11:55

old google-collect dependency

The library currently depends on google-collect-1.0-rc1.
Can you update the code to depend on the release version instead?

Original issue reported on code.google.com by [email protected] on 25 Aug 2010 at 4:50

Allow disabling of tooltips on a per serie basis for LineChart

I am proposing you add a feature that allows to disable tooltips for only for 
given data series on a LineChart (or Line Chart within ComboChart).

This would allow specific series to display tooltips on their data points but 
other series not to display tooltips at all.

Thanks.

Original issue reported on code.google.com by [email protected] on 15 Nov 2012 at 9:48

SQL datasource does not support Label




What version of the product are you using? On what operating system?

1.0.2


Please provide any additional information below.
Patched buildColumns method

    static DataTable buildColumns(ResultSet rs, List<String> columnIdsList, Query query) throws SQLException {
        DataTable result = new DataTable();
        ResultSetMetaData metaData = rs.getMetaData();
        int numOfCols = metaData.getColumnCount();
        // For each column in the table, create the column description. SQL
        // indexes
        // are 1-based.
        for (int i = 1; i <= numOfCols; i++) {
            String id = (columnIdsList == null) ? metaData.getColumnLabel(i) : columnIdsList.get(i - 1);

            String label = null;
            try {
                if (query.getLabels() != null)
                    label = query.getLabels().getLabel(new SimpleColumn(id));
            } catch (Exception e) {
                // OK
            }
            if (label == null)
                label = metaData.getColumnLabel(i);
            ColumnDescription columnDescription = new ColumnDescription(id, sqlTypeToValueType(metaData
                    .getColumnType(i)), label);
            result.addColumn(columnDescription);
        }
        return result;
    }

Original issue reported on code.google.com by [email protected] on 23 Mar 2010 at 1:37

Not drop entire json not-last null valued cell when it have properties / formatted string


What steps will reproduce the problem?
1. Create DataTable object with some not-last null valued cell and add 
formatted String and/or custom property
2. Get the DataTable json.

JsonRenderer implementation: The final json avoid null valued cells when the 
cell isn't last cell of the row even though includeFormatting parameter is true 
valued. The response of the JsonRenderer.renderDataTable for a four-cell row 
with null value at second and third row (but with property and/or formatted 
string) looks like: {v:X,p:{property=value}}},,,{v:Y,p:{property=value}. 

Version: All versions /all platforms (showed at 1.0.2 version but I've seen 
that 1.1.1 has the same behavior)

I understand that this behavior reduces response size but sometimes properties 
and/or formatted values can have visualization purposes (like style with a 
Table visualization) or maybe null values can be useful in some context. I 
think that this option must be optional (to avoid null valued cells or not; 
even last).

I've tried to remove the last condition (not the body condition) in the 
JsonRenderer.appendCellJson and this works for me. 

This change looks like:
[...]
//    if ((isLastColumn) || (!isJsonNull)) { - 'cause i want all info
      sb.append("{");
      // Value
      sb.append("v:").append(valueJson);
      // Formatted value
      if ((includeFormatting) && (!escapedFormattedString.equals(""))) {
        sb.append(",f:'").append(escapedFormattedString).append("'");
      }
      String customPropertiesString = getPropertiesMapString(cell.getCustomProperties());
      if (customPropertiesString != null) {
        sb.append(",p:").append(customPropertiesString);
      }
      sb.append("}");
//    }
} // appendCellJson ends here


Original issue reported on code.google.com by [email protected] on 25 Jun 2012 at 9:53

TableCell class needs a setValue() method

http://code.google.com/apis/visualization/documentation/dev/dsl_javadocs/com/goo
gle/visualization/datasource/datatable/TableCell.html does not contain a 
setValue method, but does have a getValue method.

We discussed this offline, and it will help tremendously with improving the 
memory foot print of our frontend servers.




Original issue reported on code.google.com by [email protected] on 1 Mar 2011 at 7:57

CsvDataSourceHelper does not support scientific notation

What steps will reproduce the problem?
1. Create csv with scientific notation
2. Set column description to numbers.
3. run DataTable data = CsvDataSourceHelper.read(reader, columnDescriptions, 
false);
4. serve and parse in client

What is the expected output? What do you see instead?
The numbers should be parsed as scientific notation, but it looks like it 
ignores anything after E.

What version of the product are you using? On what operating system?
Version 1.1.1 on AppEngine.

Original issue reported on code.google.com by [email protected] on 16 Mar 2012 at 4:21

DateValues rendered in GMT convey no timezone info, causing client side javascript mis-interpretation.

What steps will reproduce the problem?

1. Inserting a DateValue into a table requires that it be expressed in GMT
2. JSON renderer generates code to construct Date objects with 
year,month,day,hour,minute,second
3. Client-side javascript interprets date in local timezone

What is the expected output? What do you see instead?

I expect the client side to have enough information to generate correct local 
time values.


What version of the product are you using? On what operating system?

1.0.2, all platforms.


Please provide any additional information below.

You can solve this problem by having the JSON renderer generate millisecond 
past epoch constructors.  Then the client will construct dates properly since 
milliseconds past epoch are explicitly UTC, whereas date fields are interpreted 
locally.  As an added bonus, this will reduce the amount of data sent across 
the wire.

Original issue reported on code.google.com by [email protected] on 6 Jan 2011 at 3:38

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.