Re: [visualization-api] Re: Column chart - Bar color
The Visualization API does not use HTML5 internally, but it should work fine in combination with other HTML5 elements. On Friday, August 8, 2014 10:49:57 PM UTC-4, Nagendra Singh wrote: Hi, I needed to know if the Google Visualization API will work with html5 too? There is nothing that I should change or should i change anything? On Sat, Aug 2, 2014 at 5:51 AM, Andrew Gallant agal...@google.com javascript: wrote: I could not replicate this problem; do you have an example I could test? The charts are drawn with vector graphics (SVG), so they should scale well with screen *resolution*. Since your screen is comrpised of a grid of pixels, it is impossible to draw a truly smooth line that isn't perfectly aligned with the pixel grid, and you will get jagged edges - a phenomenon known as aliasing http://en.wikipedia.org/wiki/Aliasing. At a given resolution, the larger the screen is the more apparent the aliasing effect will be. I don't know if the API implements any anti-aliasing techniques, or if that is up to the browser to handle, but if there is no anti-aliasing, the effect would be quite pronounced on large, low resolution screens. On Friday, August 1, 2014 2:51:46 AM UTC-4, Nagendra Singh wrote: Sorry I didn't mention, the marker is referencing to the pointShape. On Fri, Aug 1, 2014 at 12:18 PM, Nagendra Singh nagendr...@gmail.com wrote: Hi, The marker which are displayed in the scatter chart are not having smooth edges when displayed in a big screen. Is this normal? On Thu, Jul 24, 2014 at 11:33 PM, Andrew Gallant agal...@google.com wrote: I wish I had an easy answer for you, but I don't. Finding precisely where the cause of the slowdown is and what you can do about it is a very tricky problem. If the slowdown is really due to the amount of data you loaded in the page, the solution is likely to implement something where the bulk of your data stays on the server and only what you need to display at any given time is stored client-side. On Wednesday, July 23, 2014 10:47:33 PM UTC-4, Nagendra Singh wrote: I am sorry for that. So what do you suggest I should do? On Wed, Jul 23, 2014 at 2:41 AM, Andrew Gallant asgall...@gmail.com wrote: No, I cannot access that. On Monday, July 21, 2014 11:10:38 PM UTC-4, Nagendra Singh wrote: Actually the project is still in basepilot position. So there is no public facing website. We have a page hosted as http://dgc001113207:8080/Re startSpringRestService/home Please let me know if you are able to access it. On Mon, Jul 21, 2014 at 9:03 PM, Andrew Gallant asgall...@gmail.com wrote: Your server will not affect client-side performance. Depending on how good the connection between your server and clients is, you may be able to set up a system that handles all of the data filtering server-side, keeping the quantity of data stored client-side to a minimum; there is nothing in the API that will help you do this, though, so you would have to develop a custom solution. Do you have a public-facing page I can test this on? If I can do some performance profiling, I may be able to figure out a way to cheat to improve performance without resorting to any server-side tricks. On Monday, July 21, 2014 12:06:41 AM UTC-4, Nagendra Singh wrote: Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgall...@gmail.com wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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
Re: [visualization-api] Re: Column chart - Bar color
Hi, The marker which are displayed in the scatter chart are not having smooth edges when displayed in a big screen. Is this normal? On Thu, Jul 24, 2014 at 11:33 PM, Andrew Gallant agall...@google.com wrote: I wish I had an easy answer for you, but I don't. Finding precisely where the cause of the slowdown is and what you can do about it is a very tricky problem. If the slowdown is really due to the amount of data you loaded in the page, the solution is likely to implement something where the bulk of your data stays on the server and only what you need to display at any given time is stored client-side. On Wednesday, July 23, 2014 10:47:33 PM UTC-4, Nagendra Singh wrote: I am sorry for that. So what do you suggest I should do? On Wed, Jul 23, 2014 at 2:41 AM, Andrew Gallant asgall...@gmail.com wrote: No, I cannot access that. On Monday, July 21, 2014 11:10:38 PM UTC-4, Nagendra Singh wrote: Actually the project is still in basepilot position. So there is no public facing website. We have a page hosted as http://dgc001113207:8080/ RestartSpringRestService/home Please let me know if you are able to access it. On Mon, Jul 21, 2014 at 9:03 PM, Andrew Gallant asgall...@gmail.com wrote: Your server will not affect client-side performance. Depending on how good the connection between your server and clients is, you may be able to set up a system that handles all of the data filtering server-side, keeping the quantity of data stored client-side to a minimum; there is nothing in the API that will help you do this, though, so you would have to develop a custom solution. Do you have a public-facing page I can test this on? If I can do some performance profiling, I may be able to figure out a way to cheat to improve performance without resorting to any server-side tricks. On Monday, July 21, 2014 12:06:41 AM UTC-4, Nagendra Singh wrote: Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgall...@gmail.com wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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 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
Re: [visualization-api] Re: Column chart - Bar color
I could not replicate this problem; do you have an example I could test? The charts are drawn with vector graphics (SVG), so they should scale well with screen *resolution*. Since your screen is comrpised of a grid of pixels, it is impossible to draw a truly smooth line that isn't perfectly aligned with the pixel grid, and you will get jagged edges - a phenomenon known as aliasing http://en.wikipedia.org/wiki/Aliasing. At a given resolution, the larger the screen is the more apparent the aliasing effect will be. I don't know if the API implements any anti-aliasing techniques, or if that is up to the browser to handle, but if there is no anti-aliasing, the effect would be quite pronounced on large, low resolution screens. On Friday, August 1, 2014 2:51:46 AM UTC-4, Nagendra Singh wrote: Sorry I didn't mention, the marker is referencing to the pointShape. On Fri, Aug 1, 2014 at 12:18 PM, Nagendra Singh nagendr...@gmail.com javascript: wrote: Hi, The marker which are displayed in the scatter chart are not having smooth edges when displayed in a big screen. Is this normal? On Thu, Jul 24, 2014 at 11:33 PM, Andrew Gallant agal...@google.com javascript: wrote: I wish I had an easy answer for you, but I don't. Finding precisely where the cause of the slowdown is and what you can do about it is a very tricky problem. If the slowdown is really due to the amount of data you loaded in the page, the solution is likely to implement something where the bulk of your data stays on the server and only what you need to display at any given time is stored client-side. On Wednesday, July 23, 2014 10:47:33 PM UTC-4, Nagendra Singh wrote: I am sorry for that. So what do you suggest I should do? On Wed, Jul 23, 2014 at 2:41 AM, Andrew Gallant asgall...@gmail.com wrote: No, I cannot access that. On Monday, July 21, 2014 11:10:38 PM UTC-4, Nagendra Singh wrote: Actually the project is still in basepilot position. So there is no public facing website. We have a page hosted as http://dgc001113207:8080/Re startSpringRestService/home Please let me know if you are able to access it. On Mon, Jul 21, 2014 at 9:03 PM, Andrew Gallant asgall...@gmail.com wrote: Your server will not affect client-side performance. Depending on how good the connection between your server and clients is, you may be able to set up a system that handles all of the data filtering server-side, keeping the quantity of data stored client-side to a minimum; there is nothing in the API that will help you do this, though, so you would have to develop a custom solution. Do you have a public-facing page I can test this on? If I can do some performance profiling, I may be able to figure out a way to cheat to improve performance without resorting to any server-side tricks. On Monday, July 21, 2014 12:06:41 AM UTC-4, Nagendra Singh wrote: Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgall...@gmail.com wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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
Re: [visualization-api] Re: Column chart - Bar color
I wish I had an easy answer for you, but I don't. Finding precisely where the cause of the slowdown is and what you can do about it is a very tricky problem. If the slowdown is really due to the amount of data you loaded in the page, the solution is likely to implement something where the bulk of your data stays on the server and only what you need to display at any given time is stored client-side. On Wednesday, July 23, 2014 10:47:33 PM UTC-4, Nagendra Singh wrote: I am sorry for that. So what do you suggest I should do? On Wed, Jul 23, 2014 at 2:41 AM, Andrew Gallant asgall...@gmail.com javascript: wrote: No, I cannot access that. On Monday, July 21, 2014 11:10:38 PM UTC-4, Nagendra Singh wrote: Actually the project is still in basepilot position. So there is no public facing website. We have a page hosted as http://dgc001113207:8080/ RestartSpringRestService/home Please let me know if you are able to access it. On Mon, Jul 21, 2014 at 9:03 PM, Andrew Gallant asgall...@gmail.com wrote: Your server will not affect client-side performance. Depending on how good the connection between your server and clients is, you may be able to set up a system that handles all of the data filtering server-side, keeping the quantity of data stored client-side to a minimum; there is nothing in the API that will help you do this, though, so you would have to develop a custom solution. Do you have a public-facing page I can test this on? If I can do some performance profiling, I may be able to figure out a way to cheat to improve performance without resorting to any server-side tricks. On Monday, July 21, 2014 12:06:41 AM UTC-4, Nagendra Singh wrote: Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgall...@gmail.com wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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 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
Re: [visualization-api] Re: Column chart - Bar color
No, I cannot access that. On Monday, July 21, 2014 11:10:38 PM UTC-4, Nagendra Singh wrote: Actually the project is still in basepilot position. So there is no public facing website. We have a page hosted as http://dgc001113207:8080/RestartSpringRestService/home Please let me know if you are able to access it. On Mon, Jul 21, 2014 at 9:03 PM, Andrew Gallant asgall...@gmail.com javascript: wrote: Your server will not affect client-side performance. Depending on how good the connection between your server and clients is, you may be able to set up a system that handles all of the data filtering server-side, keeping the quantity of data stored client-side to a minimum; there is nothing in the API that will help you do this, though, so you would have to develop a custom solution. Do you have a public-facing page I can test this on? If I can do some performance profiling, I may be able to figure out a way to cheat to improve performance without resorting to any server-side tricks. On Monday, July 21, 2014 12:06:41 AM UTC-4, Nagendra Singh wrote: Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgall...@gmail.com wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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 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
Re: [visualization-api] Re: Column chart - Bar color
Your server will not affect client-side performance. Depending on how good the connection between your server and clients is, you may be able to set up a system that handles all of the data filtering server-side, keeping the quantity of data stored client-side to a minimum; there is nothing in the API that will help you do this, though, so you would have to develop a custom solution. Do you have a public-facing page I can test this on? If I can do some performance profiling, I may be able to figure out a way to cheat to improve performance without resorting to any server-side tricks. On Monday, July 21, 2014 12:06:41 AM UTC-4, Nagendra Singh wrote: Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgall...@gmail.com javascript: wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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 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
Re: [visualization-api] Re: Column chart - Bar color
Actually the project is still in basepilot position. So there is no public facing website. We have a page hosted as http://dgc001113207:8080/RestartSpringRestService/home Please let me know if you are able to access it. On Mon, Jul 21, 2014 at 9:03 PM, Andrew Gallant asgallant...@gmail.com wrote: Your server will not affect client-side performance. Depending on how good the connection between your server and clients is, you may be able to set up a system that handles all of the data filtering server-side, keeping the quantity of data stored client-side to a minimum; there is nothing in the API that will help you do this, though, so you would have to develop a custom solution. Do you have a public-facing page I can test this on? If I can do some performance profiling, I may be able to figure out a way to cheat to improve performance without resorting to any server-side tricks. On Monday, July 21, 2014 12:06:41 AM UTC-4, Nagendra Singh wrote: Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgall...@gmail.com wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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 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
Re: [visualization-api] Re: Column chart - Bar color
Hi Andrew, The problem is that we need to show our customers last one month data. So its important to show all the dots. I have implemented a range slider for both date and buffer values. But they also slide very slowly. Will a better server/ workstation increase the performance? Please suggest. On Sat, Jul 12, 2014 at 8:41 PM, Andrew Gallant asgallant...@gmail.com wrote: With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@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 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
Re: [visualization-api] Re: Column chart - Bar color
With 14000 data points, the chart would probably draw quite slow. I think the only way you can increase draw speed is to reduce the number of points drawn at one time. Try setting default values for the min and max on your filter. On Saturday, July 12, 2014 1:19:38 AM UTC-4, Nagendra Singh wrote: Aproxx 14000 points for 1 month data. -- From: Andrew Gallant Sent: 12-07-2014 AM 10:38 To: google-visua...@googlegroups.com javascript: 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 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
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 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
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
Re: [visualization-api] Re: Column chart - Bar color
I meant color based on value... I do not need to hard code it.. My values changes dynamically. On Fri, Jun 27, 2014 at 10:14 PM, Andrew Gallant asgallant...@gmail.com wrote: Use a style role column to color your bars: var data = google.visualization.arrayToDataTable([ ['Name', 'Value', {role: 'style', type: 'string'}], ['High', 50, '#d51711'], ['Medium', 25, '#f9f107'], ['Low', 10, '#11d517'] ]); On Friday, June 27, 2014 3:02:01 AM UTC-4, Nagendra Singh wrote: Hi all, How can we apply color to a bar as red whenever it is high? Like a bar which has the highest value should be always red, and medium value should have yellow and at last lowest value as green.. Please suggest a way as soon as possible -- You received this message because you are subscribed to a topic in the Google Groups Google Visualization API group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/UMGeagSZ8eo/unsubscribe . To unsubscribe from this group and all its topics, 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. -- 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
You can use a DataView to make this dynamic: // get min/max from column 1 var range = data.getColumnRange(1); var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string', role: 'style', calc: function (dt, row) { var val = dt.getValue(row, 1); if (val == range.max) { return '#d51711'; // max } else if (val == range.min) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }]); You need to recalculate range whenever your data changes. Use view in place of data when drawing the chart. On Friday, June 27, 2014 1:08:29 PM UTC-4, Nagendra Singh wrote: I meant color based on value... I do not need to hard code it.. My values changes dynamically. On Fri, Jun 27, 2014 at 10:14 PM, Andrew Gallant asgall...@gmail.com javascript: wrote: Use a style role column to color your bars: var data = google.visualization.arrayToDataTable([ ['Name', 'Value', {role: 'style', type: 'string'}], ['High', 50, '#d51711'], ['Medium', 25, '#f9f107'], ['Low', 10, '#11d517'] ]); On Friday, June 27, 2014 3:02:01 AM UTC-4, Nagendra Singh wrote: Hi all, How can we apply color to a bar as red whenever it is high? Like a bar which has the highest value should be always red, and medium value should have yellow and at last lowest value as green.. Please suggest a way as soon as possible -- You received this message because you are subscribed to a topic in the Google Groups Google Visualization API group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/UMGeagSZ8eo/unsubscribe . To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-visua...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout. -- 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
//THIS IS MY JS PAGE google.load('visualization', '1.1', {packages: ['corechart','controls','table']}); google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: /RestartSpringRestService/rest/allIndicator, dataType: json, async: false }).responseText; var jsonObj = JSON.parse(jsonData); // Create our data table out of JSON data loaded from server. var size = 0; for(var sizeCount in jsonObj){ size++; } var dataArray = new Array(size+1); dataArray[0] = new Array(4); dataArray[0][0] = 'Date'; dataArray[0][1] = 'Buffer'; dataArray[0][2] = 'Cpu'; dataArray[0][3] = 'Memory'; //dataArray[0][2] = {type:'string', role:'tooltip'}; var i = 1; while(i size+1){ dataArray[i] = new Array(); //dataArray[i][1] = (jsonObj[i].siteIndicatorColor); dataArray[i][0] =new Date(jsonObj[i].dateOfOccurence); dataArray[i][1] = (jsonObj[i].bufferCount); dataArray[i][2] = (jsonObj[i].cpu); dataArray[i][3] = (jsonObj[i].memory); i++; } var data = new google.visualization.arrayToDataTable(dataArray); var options = { is3d: true, //colors: ['green','red','yellow'], bar: { groupWidth: '3%' }, title: 'Date vs. CriticalParameters comparison', titleTextStyle: {color: '#DF0101', bold: true}, width: 1000, height: 450, vAxis: {minValue: 0}, hAxis: {title: 'Date', titleTextStyle: {color: '#08088A', bold: true}}, legend: { position: 'top', maxLines: 4 } }; var chart = new google.visualization.ColumnChart(document.getElementById('ColumnChart')); var table = new google.visualization.Table(document.getElementById('TableChart')); var formatter1 = new google.visualization.ColorFormat(); formatter1.addRange(200, null, 'white', 'red'); formatter1.addRange(50, 200, 'black', 'yellow'); formatter1.addRange(0, 50, 'white', 'green'); formatter1.format(data, 1); var formatter2 = new google.visualization.ColorFormat(); formatter2.addRange(85, 100, 'white', 'red'); formatter2.addRange(70, 85, 'white', 'orange'); formatter2.addRange(0, 70, 'white', 'green'); formatter2.format(data, 2); formatter2.format(data, 3); table.draw(data, {allowHtml: true, showRowNumber: true}); chart.draw(data, options); } -- I am using formatter now, but I have hardcoded the value for high, low and medium. I need to read high, low and medium values from the properties file inside the project. Or as an alternative, if out of the three params (bufferCount, cpu and memory) any one is high it should show red , orange for medium and green for low.. If you have a solution, you can make my day.. Please help... On Fri, Jun 27, 2014 at 10:48 PM, Andrew Gallant asgallant...@gmail.com wrote: You can use a DataView to make this dynamic: // get min/max from column 1 var range = data.getColumnRange(1); var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string', role: 'style', calc: function (dt, row) { var val = dt.getValue(row, 1); if (val == range.max) { return '#d51711'; // max } else if (val == range.min) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }]); You need to recalculate range whenever your data changes. Use view in place of data when drawing the chart. On Friday, June 27, 2014 1:08:29 PM UTC-4, Nagendra Singh wrote: I meant color based on value... I do not need to hard code it.. My values changes dynamically. On Fri, Jun 27, 2014 at 10:14 PM, Andrew Gallant asgall...@gmail.com wrote: Use a style role column to color your bars: var data = google.visualization.arrayToDataTable([ ['Name', 'Value', {role: 'style', type: 'string'}], ['High', 50, '#d51711'], ['Medium', 25, '#f9f107'], ['Low', 10, '#11d517'] ]); On Friday, June 27, 2014 3:02:01 AM UTC-4, Nagendra Singh wrote: Hi all, How can we apply color to a bar as red whenever it is high? Like a bar which has the highest value should be always red, and medium value should have yellow and at last lowest value as green.. Please suggest a way as soon as possible -- You received this message because you are subscribed to a topic in the Google Groups Google Visualization API group. To unsubscribe from this topic, visit https://groups.google.com/d/ topic/google-visualization-api/UMGeagSZ8eo/unsubscribe. To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to
Re: [visualization-api] Re: Column chart - Bar color
Ok, that is a bit different from what I thought you were doing. The ColorFormatter should work for the Table, but it won't do anything for the ColumnChart. You can modify the DataView to accommodate your ranges and additional columns: var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string', role: 'style', calc: function (dt, row) { // buffer colors var val = dt.getValue(row, 1); if (val 200) { return '#d51711'; // max } else if ( 50) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 2, { type: 'string', role: 'style', calc: function (dt, row) { // cpu colors var val = dt.getValue(row, 1); if (val 85) { return '#d51711'; // max } else if ( 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 3, { type: 'string', role: 'style', calc: function (dt, row) { // memory colors var val = dt.getValue(row, 1); if (val 85) { return '#d51711'; // max } else if ( 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }]); Use this view to draw the ColumnChart only. On Friday, June 27, 2014 1:30:36 PM UTC-4, Nagendra Singh wrote: //THIS IS MY JS PAGE google.load('visualization', '1.1', {packages: ['corechart','controls','table']}); google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: /RestartSpringRestService/rest/allIndicator, dataType: json, async: false }).responseText; var jsonObj = JSON.parse(jsonData); // Create our data table out of JSON data loaded from server. var size = 0; for(var sizeCount in jsonObj){ size++; } var dataArray = new Array(size+1); dataArray[0] = new Array(4); dataArray[0][0] = 'Date'; dataArray[0][1] = 'Buffer'; dataArray[0][2] = 'Cpu'; dataArray[0][3] = 'Memory'; //dataArray[0][2] = {type:'string', role:'tooltip'}; var i = 1; while(i size+1){ dataArray[i] = new Array(); //dataArray[i][1] = (jsonObj[i].siteIndicatorColor); dataArray[i][0] =new Date(jsonObj[i].dateOfOccurence); dataArray[i][1] = (jsonObj[i].bufferCount); dataArray[i][2] = (jsonObj[i].cpu); dataArray[i][3] = (jsonObj[i].memory); i++; } var data = new google.visualization.arrayToDataTable(dataArray); var options = { is3d: true, //colors: ['green','red','yellow'], bar: { groupWidth: '3%' }, title: 'Date vs. CriticalParameters comparison', titleTextStyle: {color: '#DF0101', bold: true}, width: 1000, height: 450, vAxis: {minValue: 0}, hAxis: {title: 'Date', titleTextStyle: {color: '#08088A', bold: true}}, legend: { position: 'top', maxLines: 4 } }; var chart = new google.visualization.ColumnChart(document.getElementById('ColumnChart')); var table = new google.visualization.Table(document.getElementById('TableChart')); var formatter1 = new google.visualization.ColorFormat(); formatter1.addRange(200, null, 'white', 'red'); formatter1.addRange(50, 200, 'black', 'yellow'); formatter1.addRange(0, 50, 'white', 'green'); formatter1.format(data, 1); var formatter2 = new google.visualization.ColorFormat(); formatter2.addRange(85, 100, 'white', 'red'); formatter2.addRange(70, 85, 'white', 'orange'); formatter2.addRange(0, 70, 'white', 'green'); formatter2.format(data, 2); formatter2.format(data, 3); table.draw(data, {allowHtml: true, showRowNumber: true}); chart.draw(data, options); } -- I am using formatter now, but I have hardcoded the value for high, low and medium. I need to read high, low and medium values from the properties file inside the project. Or as an alternative, if out of the three params (bufferCount, cpu and memory) any one is high it should show red , orange for medium and green for low.. If you have a solution, you can make my day.. Please help... On Fri, Jun 27, 2014 at 10:48 PM, Andrew Gallant asgall...@gmail.com javascript: wrote: You can use a DataView to make this dynamic: // get min/max from column 1 var range = data.getColumnRange(1); var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string',
Re: [visualization-api] Re: Column chart - Bar color
Sorry, my mistake, I forgot to change the column indices in the cpu and memory columns: var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string', role: 'style', calc: function (dt, row) { // buffer colors var val = dt.getValue(row, 1); if (val 200) { return '#d51711'; // max } else if ( 50) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 2, { type: 'string', role: 'style', calc: function (dt, row) { // cpu colors var val = dt.getValue(row, 2); if (val 85) { return '#d51711'; // max } else if ( 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 3, { type: 'string', role: 'style', calc: function (dt, row) { // memory colors var val = dt.getValue(row, 3); if (val 85) { return '#d51711'; // max } else if ( 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }]); On Friday, June 27, 2014 2:00:18 PM UTC-4, Nagendra Singh wrote: Please see the attachment. The column chart is coming like this.. Please help.. // Modified Code google.load('visualization', '1.1', {packages: ['corechart','controls','table']}); google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: /RestartSpringRestService/rest/allIndicator, dataType: json, async: false }).responseText; var jsonObj = JSON.parse(jsonData); // Create our data table out of JSON data loaded from server. var size = 0; for(var sizeCount in jsonObj){ size++; } var dataArray = new Array(size+1); dataArray[0] = new Array(4); dataArray[0][0] = 'Date'; dataArray[0][1] = 'Buffer'; dataArray[0][2] = 'Cpu'; dataArray[0][3] = 'Memory'; //dataArray[0][2] = {type:'string', role:'tooltip'}; var i = 1; while(i size+1){ dataArray[i] = new Array(); //dataArray[i][1] = (jsonObj[i].siteIndicatorColor); dataArray[i][0] =new Date(jsonObj[i].dateOfOccurence); dataArray[i][1] = (jsonObj[i].bufferCount); dataArray[i][2] = (jsonObj[i].cpu); dataArray[i][3] = (jsonObj[i].memory); i++; } var data = new google.visualization.arrayToDataTable(dataArray); var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string', role: 'style', calc: function (dt, row) { // buffer colors var val = dt.getValue(row, 1); if (val 200) { return '#d51711'; // max } else if (val 50) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 2, { type: 'string', role: 'style', calc: function (dt, row) { // cpu colors var val = dt.getValue(row, 1); if (val 85) { return '#d51711'; // max } else if (val 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 3, { type: 'string', role: 'style', calc: function (dt, row) { // memory colors var val = dt.getValue(row, 1); if (val 85) { return '#d51711'; // max } else if (val 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }]); var options = { is3d: true, //colors: ['green','red','yellow'], bar: { groupWidth: '3%' }, title: 'Date vs. CriticalParameters comparison', titleTextStyle: {color: '#DF0101', bold: true}, width: 1000, height: 450, vAxis: {minValue: 0}, hAxis: {title: 'Date', titleTextStyle: {color: '#08088A', bold: true}}, legend: { position: 'top', maxLines: 4 } }; var chart = new google.visualization.ColumnChart(document.getElementById('ColumnChart')); chart.draw(view, options); } On Fri, Jun 27, 2014 at 11:18 PM, Andrew Gallant asgall...@gmail.com javascript: wrote: Ok, that is a bit different from what I thought you were
Re: [visualization-api] Re: Column chart - Bar color
Yup.. I noticed and corrected... By the way, thanks a lot... On Sat, Jun 28, 2014 at 12:06 AM, Andrew Gallant asgallant...@gmail.com wrote: Sorry, my mistake, I forgot to change the column indices in the cpu and memory columns: var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string', role: 'style', calc: function (dt, row) { // buffer colors var val = dt.getValue(row, 1); if (val 200) { return '#d51711'; // max } else if ( 50) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 2, { type: 'string', role: 'style', calc: function (dt, row) { // cpu colors var val = dt.getValue(row, 2); if (val 85) { return '#d51711'; // max } else if ( 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 3, { type: 'string', role: 'style', calc: function (dt, row) { // memory colors var val = dt.getValue(row, 3); if (val 85) { return '#d51711'; // max } else if ( 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }]); On Friday, June 27, 2014 2:00:18 PM UTC-4, Nagendra Singh wrote: Please see the attachment. The column chart is coming like this.. Please help.. // Modified Code google.load('visualization', '1.1', {packages: ['corechart','controls',' table']}); google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: /RestartSpringRestService/rest/allIndicator, dataType: json, async: false }).responseText; var jsonObj = JSON.parse(jsonData); // Create our data table out of JSON data loaded from server. var size = 0; for(var sizeCount in jsonObj){ size++; } var dataArray = new Array(size+1); dataArray[0] = new Array(4); dataArray[0][0] = 'Date'; dataArray[0][1] = 'Buffer'; dataArray[0][2] = 'Cpu'; dataArray[0][3] = 'Memory'; //dataArray[0][2] = {type:'string', role:'tooltip'}; var i = 1; while(i size+1){ dataArray[i] = new Array(); //dataArray[i][1] = (jsonObj[i].siteIndicatorColor); dataArray[i][0] =new Date(jsonObj[i].dateOfOccurence); dataArray[i][1] = (jsonObj[i].bufferCount); dataArray[i][2] = (jsonObj[i].cpu); dataArray[i][3] = (jsonObj[i].memory); i++; } var data = new google.visualization.arrayToDataTable(dataArray); var view = new google.visualization.DataView(data); view.setColumns([0, 1, { type: 'string', role: 'style', calc: function (dt, row) { // buffer colors var val = dt.getValue(row, 1); if (val 200) { return '#d51711'; // max } else if (val 50) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 2, { type: 'string', role: 'style', calc: function (dt, row) { // cpu colors var val = dt.getValue(row, 1); if (val 85) { return '#d51711'; // max } else if (val 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }, 3, { type: 'string', role: 'style', calc: function (dt, row) { // memory colors var val = dt.getValue(row, 1); if (val 85) { return '#d51711'; // max } else if (val 70) { return '#11d517'; // min } else { return '#f9f107'; // all others } } }]); var options = { is3d: true, //colors: ['green','red','yellow'], bar: { groupWidth: '3%' }, title: 'Date vs. CriticalParameters comparison', titleTextStyle: {color: '#DF0101', bold: true}, width: 1000, height: 450, vAxis: {minValue: 0}, hAxis: {title: 'Date', titleTextStyle: {color: '#08088A', bold: true}}, legend: { position: 'top', maxLines: 4 } }; var chart = new google.visualization.ColumnChart(document. getElementById('ColumnChart')); chart.draw(view, options); } On Fri, Jun 27, 2014 at 11:18 PM,