[visualization-api] Re: display hour text but not all hours

2014-07-11 Thread Neil Camara
Andrew,

It's parsing it properly. The graph looks fine too. The only thing I want 
to achieve is by reducing the hour series just like the image. It's ok, 
I'll just explain it to our PO and the designer. I noticed that when I 
shrink the browser, it automatically adjust.

Thanks.

On Thursday, July 10, 2014 8:56:34 AM UTC-5, Andrew Gallant wrote:

 Your jsonData.forEach function is not parsing your data correctly.  Take a 
 look at that function to figure out how you need to change it to match your 
 data.  I suspect that you want something like this:

 jsonData.forEach(function(a) {
 a.dates.forEach(function(d) {
 dataFields.forEach(function(f) {
 // do stuff
 });
 });
 });

 On Tuesday, July 8, 2014 2:23:53 PM UTC-4, Neil Camara wrote:

 I'm using Google's ng-google-chart.js. This is the exact link - 
 https://github.com/bouil/angular-google-chart



 On Tuesday, July 8, 2014 12:24:39 PM UTC-5, Andrew Gallant wrote:

 With that, $scopde.odometerChart is the object returned by plotHourly, 
 but what are you using to turn that code into a chart object (or 
 ChartWrapper, or something else?) and how are you drawing the chart?

 On Tuesday, July 8, 2014 10:11:19 AM UTC-4, Neil Camara wrote:

 This is the code that will receive the chart.

 div google-chart chart=odometerChart/div

 This is the code that will plot the graph. The first param is the json 
 data. Second one is just color. Third is for the title of the chart but I 
 left it empty. The 'datetime' is a property in the jsondata and 
 odometerInchesPrinted is another property too but has the number value. 
 Refer to my earlier plotHourly function in the gist.

 $scope.odometerChart = plotHourly(tmpDeviceModels[0].dates, 
 $scope.iconColor1, '', 'datetime', 'odometerInchesPrinted');

 Fyi, this is Angular.

 On Monday, July 7, 2014 8:56:25 PM UTC-5, Andrew Gallant wrote:

 Can you also post the code where the chart is drawn?  I'm trying to 
 replicate your setup as exactly as I can (as far as the chart is 
 concerned) 
 so I can figure out what we need to do to get this to display the way you 
 want.

 On Monday, July 7, 2014 1:59:58 AM UTC-4, Neil Camara wrote:

 Here it is Andrew. Sorry, I was all day out in my garden. :)

 https://gist.github.com/c0debreaker/4e4944c382ac44757db4

 On Sunday, July 6, 2014 2:37:42 PM UTC-5, Andrew Gallant wrote:

 Can you post a sample of the jsonData contents?

 On Sunday, July 6, 2014 2:44:07 AM UTC-4, Neil Camara wrote:

 Hi Andrew,

 This is the code I wrote that will parse our custom json data.

 https://gist.github.com/c0debreaker/d866cbfdf5f40e315a55

 I'm using string and number types.

 Also, I have other questions :)
 1. How can I add that single vertical line on the chart? All of my 
 charts only have horizontal lines.
 2. There are chart design drawn by our design where it doesn't 
 display the text for the y-axis. How do I prevent it from showing up? 
 Once 
 it's gone, I need to add a text at the bottom center of the 
 chart(where 
 y-axis text where). An example text that I am seeing on the drawing is 
 June 2014.

 Thanks a lo!


 On Saturday, July 5, 2014 10:40:40 AM UTC-5, Andrew Gallant wrote:

 The short answer is yes, you can display hours like that.  How you 
 go about it depends on how your data is structured.  Are you using 
 the 
 timeofday or datetime data types, or are you using string or 
 number 
 types?  If you provide a code sample for generating your chart, I can 
 work 
 with you to figure out how to make the hours display correctly.

 On Saturday, July 5, 2014 2:12:47 AM UTC-4, Neil Camara wrote:

 I forgot to mention that I still have to show all 24 hour data.

 On Saturday, July 5, 2014 1:08:51 AM UTC-5, Neil Camara wrote:

 Hi folks,

 I was given this design by our designer. Is it possible to 
 display the hour similar to the image below? 3:00   6:00  9:00 and 
 so on
 if it is, can someone please make a plunkr?

 http://i.imgur.com/BUmOSDn.png

 Thanks in advance!

 Neil



-- 
You received this message because you are subscribed to the Google Groups 
Google Visualization API group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] getImageURI is returning slightly cropped image for LineChart

2014-07-11 Thread abhisek mishra
Hi,
I am calling getImageURI to fetch the png data of LineChart, but the image 
data is returning slightly cropped image at the borders. Please let me know 
if anyone else faced the similar issue before.

var chart = new google.visualization.LineChart(container);

google.visualization.events.addListener(chart, 'ready', function () 
{

document.getElementById('dataHolder').innerHTML = 
chart.getImageURI();

  });

chart.draw(data, options);

-- 
You received this message because you are subscribed to the Google Groups 
Google Visualization API group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] Re: Column chart - Bar color

2014-07-11 Thread Andrew Gallant
If the problem is with the chart drawing, then no, minifying your scripts 
will not help.  Approximately how many data points are in your chart?

On Friday, July 11, 2014 10:53:32 PM UTC-4, Nagendra Singh wrote:

 Hi,
 I think drawing the chart is what taking time. Because when the page 
 loads, the indicators and the sliders are generated quickly, but the 
 scatter chart displays after 10-12 secs. 
 What I was thinking, is there a way to minify my self written js pages. 
 Will this help?


 On Fri, Jul 11, 2014 at 7:12 PM, Andrew Gallant asgall...@gmail.com 
 javascript: wrote:

 How much data is one month's worth?  Thousands of records, millions of 
 records?

 You could have any of three main sources of performance problems: 1) your 
 server could be slow in querying your data, 2) sending data from server to 
 client could be slow, and/or 3) drawing the charts could be slow.  Profile 
 the performance of different aspects of your page to determine where the 
 source of slowness is, and then you can begin looking for ways to address 
 it.


 On Friday, July 11, 2014 1:48:08 AM UTC-4, Nagendra Singh wrote:

 Hi Andrew,

 Every thing is working fine. But i need an advice. I have just added only 
 one month log files. The first page is displaying very damn slowly. I will 
 share the code below. There are three indicators, and the indicator which 
 is red will show the graph below. And the rest will be shown onclick next 
 page. 

 Please suggest me, what should I do in order to keep the performance high. 
 Because in future when the project will be up and running, there will be 
 years of log files which the site has to collect and display it. Please 
 help!!!

 Here is the code for my page:


 *%@taglib uri=http://www.springframework.org/tags 
 http://www.springframework.org/tags prefix=spring%*
 *%@taglib uri=http://www.springframework.org/tags/form 
 http://www.springframework.org/tags/form prefix=sf%*
 *%@taglib uri=http://java.sun.com/jsp/jstl/core 
 http://java.sun.com/jsp/jstl/core prefix=c%*
 *%@ page session=false %*
 *%@page import=com.minestar.spring.utils.PropertiesReader %*
 *%*
 *PropertiesReader propertiesReader = new PropertiesReader();*
 *propertiesReader.load(siteIndicator.properties);*
 *int bufferCountHigh 
 =Integer.parseInt(propertiesReader.getPropertyValue(buffer.high));*
 *double cpuHigh 
 =Double.parseDouble(propertiesReader.getPropertyValue(cpu.high));*
 *double memoryHigh 
 =Double.parseDouble(propertiesReader.getPropertyValue(memory.high));*

 *int bufferCountSite = Integer.parseInt(request.getParameter(buffer1));*
 *double cpuHighSite=Double.parseDouble(request.getParameter(cpu1));*
 *double cpuMemorySite=Double.parseDouble(request.getParameter(memory1));*

  *boolean b= bufferCountSitebufferCountHigh;*
 *boolean c= cpuHighSitecpuHigh;*
 *boolean m= cpuMemorySitememoryHigh;*

 *boolean b1= bufferCountSitebufferCountHigh;*
 *boolean c1= cpuHighSitecpuHigh;*
 *boolean m1= cpuMemorySitememoryHigh;*

 */* out.println(b);*
 *out.println(c);*
 *out.println(m);*
 *out.println(---);*
 *out.println(b1);*
 *out.println(c1);*
 *out.println(m1); */*
 *%*
 *html*

 *head*
 * titleScatter Graph/title*
 *link rel=stylesheet type=text/css media=all href=c:url 
 value=/resources/css/styles/li-scroller.css /*
 *link rel=stylesheet type=text/css media=all href=c:url 
 value=/resources/css/styles/button.css /*
 *link rel=stylesheet type=text/css media=all href=c:url 
 value=/resources/css/styles/scatterFilter.css /*
 *%-- link rel=stylesheet type=text/css media=all href=c:url 
 value=/resources/css/styles/buttons.css / --%*
 *link rel=stylesheet 
 href=//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css 
 http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css*
 *script type=text/javascript src=https://www.google.com/jsapi 
 https://www.google.com/jsapi/script*
 *script 
 src=http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js 
 http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js/script*
 
 *script src=//code.jquery.com/ui/1.11.0/jquery-ui.js 
 http://code.jquery.com/ui/1.11.0/jquery-ui.js/script*
 *script src=c:url value=/resources/js/jquery.li-scroller.1.0.js 
 / type=text/javascript/script*
 *script src=c:url value=/resources/js/googleScatterChart1.js / 
 type=text/javascript/script*
 *script src=c:url value=/resources/js/googleScatterChart2.js / 
 type=text/javascript/script*
 *script src=c:url value=/resources/js/googleScatterChart3.js / 
 type=text/javascript/script*
 *script src=c:url value=/resources/js/googleColumnChart.js / 
 type=text/javascript/script*
 *script src=c:url value=/resources/js/buttons1.js / 
 type=text/javascript/script*
 *script src=c:url value=/resources/js/buttons2.js / 
 type=text/javascript/script*
 *script src=c:url value=/resources/js/buttons3.js / 
 type=text/javascript/script*
 *script src=c:url value=/resources/js/jsDraw2D.js / 
 

RE: [visualization-api] Re: Column chart - Bar color

2014-07-11 Thread Nagendra Kumar Singh
Aproxx 14000 points for 1 month data.

-Original Message-
From: Andrew Gallant
Sent: 12-07-2014 AM 10:38
To: google-visualization-api@googlegroups.com
Subject: Re: [visualization-api] Re: Column chart - Bar color

If the problem is with the chart drawing, then no, minifying your scripts will 
not help.  Approximately how many data points are in your chart?

On Friday, July 11, 2014 10:53:32 PM UTC-4, Nagendra Singh wrote:

Hi,
I think drawing the chart is what taking time. Because when the page loads, the 
indicators and the sliders are generated quickly, but the scatter chart 
displays after 10-12 secs. 

What I was thinking, is there a way to minify my self written js pages. Will 
this help?
 



On Fri, Jul 11, 2014 at 7:12 PM, Andrew Gallant asgall...@gmail.com wrote:
 

How much data is one month's worth?  Thousands of records, millions of records?



You could have any of three main sources of performance problems: 1) your 
server could be slow in querying your data, 2) sending data from server to 
client could be slow, and/or 3) drawing the charts could be slow.  Profile the 
performance of different aspects of your page to determine where the source of 
slowness is, and then you can begin looking for ways to address it.
 


On Friday, July 11, 2014 1:48:08 AM UTC-4, Nagendra Singh wrote:



 
Hi Andrew,



Every thing is working fine. But i need an advice. I have just added only one 
month log files. The first page is displaying very damn slowly. I will share 
the code below. There are three indicators, and the indicator which is red will 
show the graph below. And the rest will be shown onclick next page. 




Please suggest me, what should I do in order to keep the performance high. 
Because in future when the project will be up and running, there will be years 
of log files which the site has to collect and display it. Please help!!!




Here is the code for my page:








%@taglib uri=http://www.springframework.org/tags; prefix=spring%

%@taglib uri=http://www.springframework.org/tags/form; prefix=sf%

%@taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c%

%@ page session=false %

%@page import=com.minestar.spring.utils.PropertiesReader %

%

PropertiesReader propertiesReader = new PropertiesReader();

propertiesReader.load(siteIndicator.properties);

int bufferCountHigh 
=Integer.parseInt(propertiesReader.getPropertyValue(buffer.high));
 
double cpuHigh 
=Double.parseDouble(propertiesReader.getPropertyValue(cpu.high));
 
double memoryHigh 
=Double.parseDouble(propertiesReader.getPropertyValue(memory.high));




int bufferCountSite = Integer.parseInt(request.getParameter(buffer1));

double cpuHighSite=Double.parseDouble(request.getParameter(cpu1));

double cpuMemorySite=Double.parseDouble(request.getParameter(memory1));
 



boolean b= bufferCountSitebufferCountHigh;

boolean c= cpuHighSitecpuHigh;

boolean m= cpuMemorySitememoryHigh;




boolean b1= bufferCountSitebufferCountHigh;

boolean c1= cpuHighSitecpuHigh;

boolean m1= cpuMemorySitememoryHigh;




/* out.println(b);

out.println(c);

out.println(m);

out.println(---);

out.println(b1);

out.println(c1);

out.println(m1); */

%

html




head

 titleScatter Graph/title

link rel=stylesheet type=text/css media=all href=c:url 
value=/resources/css/styles/li-scroller.css /

link rel=stylesheet type=text/css media=all href=c:url 
value=/resources/css/styles/button.css /

link rel=stylesheet type=text/css media=all href=c:url 
value=/resources/css/styles/scatterFilter.css /

%-- link rel=stylesheet type=text/css media=all href=c:url 
value=/resources/css/styles/buttons.css / --%

 link rel=stylesheet 
href=//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css

script type=text/javascript src=https://www.google.com/jsapi;/script

script 
src=http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js;/script



script src=//code.jquery.com/ui/1.11.0/jquery-ui.js/script

script src=c:url value=/resources/js/jquery.li-scroller.1.0.js / 
type=text/javascript/script

script src=c:url value=/resources/js/googleScatterChart1.js / 
type=text/javascript/script

script src=c:url value=/resources/js/googleScatterChart2.js / 
type=text/javascript/script

script src=c:url value=/resources/js/googleScatterChart3.js / 
type=text/javascript/script

script src=c:url value=/resources/js/googleColumnChart.js / 
type=text/javascript/script

script src=c:url value=/resources/js/buttons1.js / 
type=text/javascript/script

script src=c:url value=/resources/js/buttons2.js / 
type=text/javascript/script

script src=c:url value=/resources/js/buttons3.js / 
type=text/javascript/script

script src=c:url value=/resources/js/jsDraw2D.js / 
type=text/javascript/script

script src=c:url value=/resources/js/newWindow.js / 
type=text/javascript/script

script type=text/javascript

$(function(){

$(ul#ticker01).liScroll();

});