Giter Site home page Giter Site logo

vis-table's People

Contributors

markw65 avatar

Watchers

 avatar

vis-table's Issues

"xxx" is not a known field (line 301, visparser.php)

What steps will reproduce the problem?
1. Having a csv file like this:
"date_time as datetime","Value as number","valueID as number","user"
2005-01-06 10:26:00,-0.7,1,Alias1
2005-01-06 10:35:00,-0.98,1,Alias2

2. And using
   var query = new
google.visualization.Query('http://www.example.com/csvtable.php');

with the query: 
  query.setQuery('select Value,user where valueID=1'); 

What is the expected output? What do you see instead?
The data table with the query. The message error " 'valueID' is not a known
field" is obtained instead.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 8 Feb 2010 at 3:12

Field names with capital letters in CSV files are not select-able

What steps will reproduce the problem?
1. Obtain a CSV file whose field headings (first row) contains capital leters
2. Try to run a select query on that field
3. Observe the "<fieldname> is not a known field" error.

What is the expected output? What do you see instead?
I expect to be able to select columns based on field headings regardless of 
their capitalization. Instead, I can only select columns whose field headings 
are all lowercase in the original CSV input.

What version of the product are you using? On what operating system?
I am using r33 of this project on PHP 5.4.

Please provide any additional information below.
A patch is attached. In my limited testing, removing the strtolower() calls 
wrapping the parser does not introduce other errors and resolves this issue. An 
example of a CSV file where the unpatched issue is reproducible is at 
http://viewportsizes.com/devices.csv

Original issue reported on code.google.com by [email protected] on 11 May 2015 at 2:00

Attachments:

Wrong decimal separator (',') in JSON output in double/real type values at non-EN locales

What steps will reproduce the problem?
1. setlocale(LC_ALL, 'pl_PL') - at main php script level (eg. index.php ) 
2. $v = '12.345'; $v = (double)$v;
3. echo $v; // prints 12,345

Probably this is true for any language/locale using comma instead dot as 
decimal separator.

I've tested on PHP 5.2.3, Linux 2.6.21.5-smp on Sun E450 hardware

Small patch resolve this problem:
vistable.php from line 1919:
>$out = json_encode($this->response);
>$out = preg_replace('/"(new Date\(.*?\))"/', "$1", $out);
>$out = preg_replace('/([\{,])"([A-Za-z_][A-Za-z0-9_]*)"/', "$1$2", $out);
Add new one:
++ $out = preg_replace('/(v:\d+),(\d+)/', "$1.$2", $out);



Original issue reported on code.google.com by [email protected] on 15 Nov 2010 at 10:20

Error on last colum CSV parser

Using the following CSV

date as date,price1 as number,price2 as number
1263513600,1.01639745219793,0.97529044635285
1262736000,1.01946578978044,1.00637294052746

The last column is get as "price2 as number\r" and the regular expression that 
identify the type, fails

if (preg_match('/^(.*) as 
(date|datetime|boolean|timeofday|number)$/',$id,$matches)) {

Works for me using trim.

if (preg_match('/^(.*) as 
(date|datetime|boolean|timeofday|number)$/',trim($id),$matches)) {

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

Error parsing ',' in select query

What steps will reproduce the problem?
1. Call query 'select * where type=0' - is OK
2. Call query 'select date, bytes where type=0' - fails with "Unexpected token"
3.

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


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

Please provide any additional information below.
I believe the error might be around line 308 in visparser.php. The only
operator checked is '(', and something should probably be done with the
operator ',' - maybe a skip?

Original issue reported on code.google.com by [email protected] on 30 Dec 2009 at 1:35

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.