[visualization-api] Loading multiple different charts at one page

2018-12-30 Thread Shahid Majeed
Hi,

I am trying to draw line and bar chart at my default page. I follow the 
example code but it through exception in the console.

https://www.gstatic.com/charts/loader.js";>
https://www.google.com/jsapi";>

google.charts.load('current', { packages: ['corechart'] });

$(document).ready(function () {
displayDashboard();
setInterval(function () {
displayDashboard();
}, 6);
});
function displayDashboard() {
var dailyBookingChartData;
var monthlyChartData;
google.charts.setOnLoadCallback(getDailyBookingChartData);
google.charts.setOnLoadCallback(getMonthlyChartData);
}
function getDailyBookingChartData() {
$.ajax({
type: "POST",
url: "/services/dashboard.asmx/getBookedRoomsPerHour",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
dailyBookingChartData = data.d;
},
error: function () {
console.log("Error loading getDailyBookingChartData! 
Please try again.");
}
}).done(function () {
drawDailyBookingChart();
});
}
function drawDailyBookingChart() {
var jsonChartData = $.parseJSON(dailyBookingChartData);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn('datetime', 'Time of Day');
dataTable.addColumn('number', 'Centralen');
dataTable.addColumn('number', 'Odenplan');
dataTable.addColumn('number', 'Strandvägen');
for (var i = 0; i < jsonChartData.length; i++) {
dataTable.addRow([new Date(jsonChartData[i].Tid), 
jsonChartData[i]["Centralen"], jsonChartData[i]["Odenplan"], 
jsonChartData[i]["Strandvägen"]]);
}
var options = {
bars: 'vertical',
hAxis: {
title: '',
format: 'H:mm',
minValue: 6,
maxValue: 23
},
vAxis: {
title: '# Mötesrum Bokningar',
format: 'decimal'
}
};
var columnChart = new 
google.charts.Bar(document.getElementById('dailyBookingChart'));
columnChart.draw(dataTable, 
google.charts.Bar.convertOptions(options));
}
function getMonthlyChartData() {
$.ajax({
type: "POST",
url: 
"/services/dashboard.asmx/getEstimatedAndDebitedStatisticsPerDay",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
monthlyChartData = data.d;
},
error: function () {
console.log("Error loading getMonthlyChartData! Please 
try again.");
}
}).done(function () {
drawMonthChart();
});
}
function drawMonthChart() {
var jsonChartData = $.parseJSON(monthlyChartData);
console.log(jsonChartData);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn('date', 'Tid');
dataTable.addColumn('number', 'estimated');
dataTable.addColumn('number', 'debited');
for (var i = 0; i < jsonChartData.length; i++) {
dataTable.addRow([new Date(jsonChartData[i].Date), 
jsonChartData[i]["estimated"], jsonChartData[i]["debited"]]);
}
var options = {
hAxis: {
title: 'Month',
}
};
var lineChart = new 
google.charts.lineChart(document.getElementById('monthlyChart'));
lineChart.draw(dataTable, 
google.charts.lineChart.convertOptions(options));
}




Default.aspx:127 Uncaught TypeError: google.charts.lineChart is not a 
constructor
at drawMonthChart (Default.aspx:127)
at Object. (Default.aspx:109)
at l (jquery.min.1.8.3.js:2)
at Object.fireWith [as resolveWith] (jquery.min.1.8.3.js:2)
at T (jquery.min.1.8.3.js:2)
at XMLHttpRequest.r (jquery.min.1.8.3.js:2)
drawMonthChart @ Default.aspx:127
(anonymous) @ Default.aspx:109
l @ jquery.min.1.8.3.js:2
fireWith @ jquery.min.1.8.3.js:2
T @ jquery.min.1.8.3.js:2
r @ jquery.min.1.8.3.js:2
XMLHttpRequest.send (async)
send @ jquery.min.1.8.3.js:2
ajax @ jquery.min.1.8.3.js:2
getMonthlyChartData @ Default.aspx:97
Promise.then (async)
google.G.K.U.hl @ loader.js:231
displayDashboard @ Default.aspx:34
(anonymous) @ Default.aspx:25
setInterval (async)
(anonymous) @ Default.aspx:24
l @ jquery.min.1.8.3.js:2
fireWith @ jquery.min.1.8.3.js:2
ready @ 

Re: [visualization-api] material column chart

2018-12-28 Thread Shahid Majeed
After adding viewWindow options i get the following error.
a.getTime is not a function 

actually Time column in my datatable is date type. might be that is the 
reason. here is updated script

   
google.load('visualization', '1', { packages: ['corechart','bar'], 
'language': 'sv' });
var chartData;

$(document).ready(function () {
$.ajax({
type: "POST",
url: "/services/dashboard.asmx/getBookedRoomsPerHour",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
chartData = data.d;
},
error: function () {
alert("Error loading data! Please try again.")
}
}).done(function () {
drawDailyPerHourBookingStatus();
});
});
function drawDailyPerHourBookingStatus() {
var jsonChartData = $.parseJSON(chartData);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn('date', 'Time of Day');
dataTable.addColumn('number', 'Centralen');
dataTable.addColumn('number', 'Odenplan');
dataTable.addColumn('number', 'Strandvägen');
for (var i = 0; i < jsonChartData.length; i++) {
dataTable.addRow([new Date(jsonChartData[i].Tid), 
jsonChartData[i]["Centralen"], jsonChartData[i]["Odenplan"], 
jsonChartData[i]["Strandvägen"]]);
}
var options = {
bars: 'vertical',
hAxis: {
title: '',
format: 'H:mm',
viewWindow: {
min: [7, 30,0],
max: [17, 30, 0]
}
},
vAxis: {
title: '# Bokningar',
format: 'decimal'
}
};
var columnChart = new 
google.charts.Bar(document.getElementById('dailyPerHourBookingStatus'));
columnChart.draw(dataTable, 
google.charts.Bar.convertOptions(options));
}


On Friday, December 28, 2018 at 3:57:40 PM UTC+1, yassin azouzi wrote:
>
> excellent 
> essai ce code dans les options
> title: 'Motivation and Energy Level Throughout the Day',
> hAxis: {
>   title: 'Time of Day',
>   format: 'h:mm a',
>   viewWindow: {
>     min: [7, 30, 0],
> max: [17, 30, 0]
>   }
>
> Le ven. 28 déc. 2018 à 15:44, Shahid Majeed  > a écrit :
>
>> HI Yassin,
>>
>> I successfully generate the graph now. Only problem for me is that its 
>> not shows all the label on x-axis. I have continues data. For example 
>> 06:00, 07:00, 08:00 and son till 23:00. 
>> I want to show all the legends on x-axis but dont know how?
>> Here is my final script. and picture with result.
>>
>>
>> https://www.google.com/jsapi</a>
>> ">
>> 
>> google.load('visualization', '1', { packages: 
>> ['corechart','bar'], 'language': 'sv' });
>> var chartData;
>>
>> $(document).ready(function () {
>> $.ajax({
>> type: "POST",
>> url: "/services/dashboard.asmx/getBookedRoomsPerHour",
>> contentType: "application/json; charset=utf-8",
>> dataType: "json",
>> success: function (data) {
>> chartData = data.d;
>> },
>> error: function () {
>> alert("Error loading data! Please try again.")
>> }
>> }).done(function () {
>> drawDailyPerHourBookingStatus();
>> });
>> });
>> function drawDailyPerHourBookingStatus() {
>> var jsonChartData = $.parseJSON(chartData);
>> console.log(jsonChartData);
>> var dataTable = new google.visualization.DataTable();
>> dataTable.addColumn('date', 'Time of Day');
>> dataTable.addColumn('number', 'Centralen');
>> dataTable.addColumn('number', 'Odenplan');
>> dataTable.addColumn('number', 'Strandvägen');
>> for (var i = 0; i < jsonChartData.length; i++) {
>> dataTable.addRow([new Date(jsonChartData[i].Tid), 
>> jsonChartData[i]["Centralen"], jsonChartData[i]["Odenplan"], 
>> jsonChartData[i]["Strandvägen

[visualization-api] Re: Multiple series line graph from csv file.

2016-07-07 Thread Shahid Majeed
following function updated and getting "Uncaught TypeError: Cannot read 
property 'arrayToDataTable' of undefined"
 function processData(allText) {
 var allLinesArray = allText.split('\n');
 graph(allLinesArray);
 //if (allLinesArray.length > 0) {
 //var cpu0 = [];
 //for (var i = 0; i <= allLinesArray.length - 1; i++) {
 //var rowData = allLinesArray[i].split(',');
 //if (rowData && rowData.length > 1) 
 //cpu0.push({ x: rowData[0], y: rowData[1] });
 //}
 //}
 }

On Thursday, July 7, 2016 at 4:21:44 PM UTC+2, Shahid Majeed wrote:
>
>
> Hi,
>
> I try to generate line graph from csv file and csv file have multiple 
> series.
>
> My CSV look like this
>
> timestemp, cpu0, cpu1, cpu2, cpu3
>
> 12, 30.78, 67.89, 20, 60.89
>
> Here is my code, but graph is not generated. I only get following two 
> warnings in console.
> Synchronous XMLHttpRequest on the main thread is deprecated because of its 
> detrimental effects to the end user's experience. For more help, check 
> https://xhr.spec.whatwg.org/.
> Setting 'XMLHttpRequest.withCredentials' for synchronous requests is 
> deprecated.
>
> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="jqueryCSV.aspx.cs" 
>>> Inherits="jqueryCSV" %>
>>
>>
>>> 
>>
>>
>>> http://www.w3.org/1999/xhtml;>
>>
>> 
>>
>> 
>>
>> http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js&quot</a>;>
>>
>> https://www.gstatic.com/charts/loader.js&quot</a>;>
>>
>>  
>>
>>  $(document).ready(function () {
>>
>>
>>>  $.ajax(
>>
>>  {
>>
>>  type: "GET",
>>
>>  url: "Data.csv",
>>
>>  dataType: "text",
>>
>>  success: function (data) { processData(data); }
>>
>>  });
>>
>>  });
>>
>>  function processData(allText) {
>>
>>  var allLinesArray = allText.split('\n');
>>
>>  if (allLinesArray.length > 0) {
>>
>>  var cpu0 = [];
>>
>>  for (var i = 0; i <= allLinesArray.length - 1; i++) {
>>
>>  var rowData = allLinesArray[i].split(',');
>>
>>  if (rowData && rowData.length > 1) 
>>
>>  cpu0.push({ x: rowData[0], y: rowData[1] });
>>
>>  }
>>
>>  }
>>
>>  }
>>
>>  function graph(data) {
>>
>>  google.charts.load('current', { 'packages': ['corechart'] });
>>
>>  google.charts.setOnLoadCallback(renderGraph(data));
>>
>>  }
>>
>>  
>>
>>  function renderGraph(arrayData) {
>>
>>  var data = google.visualization.arrayToDataTable(arrayData);
>>
>>  var options = {
>>
>>  title: 'Company Performance',
>>
>>  curveType: 'function',
>>
>>  legend: { position: 'bottom' }
>>
>>  };
>>
>>
>>>  var chart = new 
>>> google.visualization.LineChart(document.getElementById('curve_chart'));
>>
>>
>>>  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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/1cc8ba63-e079-472c-90f3-24bc9198f17d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] Multiple series line graph from csv file.

2016-07-07 Thread Shahid Majeed

Hi,

I try to generate line graph from csv file and csv file have multiple 
series.

My CSV look like this

timestemp, cpu0, cpu1, cpu2, cpu3

12, 30.78, 67.89, 20, 60.89

Here is my code, but graph is not generated. I only get following two 
warnings in console.
Synchronous XMLHttpRequest on the main thread is deprecated because of its 
detrimental effects to the end user's experience. For more help, check 
https://xhr.spec.whatwg.org/.
Setting 'XMLHttpRequest.withCredentials' for synchronous requests is 
deprecated.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="jqueryCSV.aspx.cs" 
>> Inherits="jqueryCSV" %>
>
>
>> 
>
>
>> http://www.w3.org/1999/xhtml;>
>
> 
>
> 
>
> > src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js";>
>
> > src="https://www.gstatic.com/charts/loader.js";>
>
>  
>
>  $(document).ready(function () {
>
>
>>  $.ajax(
>
>  {
>
>  type: "GET",
>
>  url: "Data.csv",
>
>  dataType: "text",
>
>  success: function (data) { processData(data); }
>
>  });
>
>  });
>
>  function processData(allText) {
>
>  var allLinesArray = allText.split('\n');
>
>  if (allLinesArray.length > 0) {
>
>  var cpu0 = [];
>
>  for (var i = 0; i <= allLinesArray.length - 1; i++) {
>
>  var rowData = allLinesArray[i].split(',');
>
>  if (rowData && rowData.length > 1) 
>
>  cpu0.push({ x: rowData[0], y: rowData[1] });
>
>  }
>
>  }
>
>  }
>
>  function graph(data) {
>
>  google.charts.load('current', { 'packages': ['corechart'] });
>
>  google.charts.setOnLoadCallback(renderGraph(data));
>
>  }
>
>  
>
>  function renderGraph(arrayData) {
>
>  var data = google.visualization.arrayToDataTable(arrayData);
>
>  var options = {
>
>  title: 'Company Performance',
>
>  curveType: 'function',
>
>  legend: { position: 'bottom' }
>
>  };
>
>
>>  var chart = new 
>> google.visualization.LineChart(document.getElementById('curve_chart'));
>
>
>>  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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/f166ecc6-404a-4299-ac19-d70c6c8ba0fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] annotation overlap the next or previous bar annotation

2016-01-23 Thread Shahid Majeed
Hi,

I tried to produce sales bar chart with google chart api. everything 
working fine except annotation are overlaping each other that make very 
hard to user to read. Could please suggest me how to handle this problem. 

Picture of my graph is attached and my script is here.


  
google.load('visualization', '1', {packages: [
'corechart', 'bar'],'language': 'sv'});
google.setOnLoadCallback(drawAntalChart);
 
function drawAntalChart() { 
var data = google.visualization.arrayToDataTable([  
['Projektledare','försäljning','Antal',
'Avg.försäljning/Antal'],['Martinez',479440,589,813.9898],['Andersson ',
233351,691,337.7004],['Kercevic',34700,57,608.7719]]);var view = new google.
visualization.DataView(data);view.setColumns([0, 1,{calc: "stringify",
sourceColumn: 1,type: "string",role: "annotation"},2, {calc: "stringify",
sourceColumn: 2,type: "string",role: "annotation"},3,{calc: "stringify",
sourceColumn: 3,type: "string",role: "annotation"}]);var formatter = new 
google.visualization.NumberFormat({suffix: ' kr.', negativeColor: 'red', 
   negativeParens: true, decimalSymbol: ',',
groupingSymbol: ' '});formatter.format(data, 1);formatter.format(data, 3); 
var options = {title: 'Projektledare statistik försäljning/Antal',vAxis: {
format: 'currency', gridlines: { count: 10 }} };var chart = new google.
visualization.ColumnChart(document.getElementById('div_chart'));chart.draw(
view, 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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/c216a7dd-0f83-446a-867a-4f7a575cd6e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Hi,
I am trying to add sales values inside the bar of the google bar chart. But 
did not succeed. Please can someone help me. I have following markup.

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" 
AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>

https://www.google.com/jsapi";>

google.load('visualization', '1', { packages: ['bar'] });
google.setOnLoadCallback(drawAntalChart);
function drawAntalChart() {
var data = google.visualization.arrayToDataTable([
['Projektledare', 'Sale', 'Avg Sale'],
['Wiberg', 26030, 13015],
['Andersson ', 461690, 19237.08],
['Ranheimer', 304045, 33782.78]]);

var options = { chart: { title: 'Projektledning: Sales' } };
var chart = new 
google.charts.Bar(document.getElementById('div_chart')); chart.draw(data, 
options);
} 






Picture attached how the graph look.

Thanks in advance

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/5d68bf0e-eb70-46ab-8ff1-823b1663e48a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Hi sergey,
I have change package setting like this 
google.load('visualization', '1', { packages: ['corechart', 'bar'] });

But it does not effect on it.
Do you have any sample code how i can achieve my requirement.

What exactly i want to acheive is that i have to compare the all project 
leaders. How much they sale and avg sale. As you see in my picture 
attached. I have project leaders and their sale and avg sale values on the 
graph.

I want to show sale and avg sale values in the bars. so that it is visible 
we dont need to take the mouse curse to see the actually value.
second is it possible to show the graph in 3D.

Thanks in advance.


On Wednesday, January 20, 2016 at 7:19:21 PM UTC+1, Sergey wrote:
>
> Hi Shahid,
>
> It looks like you're using the Material Bar Chart, and are attempting to 
> use annotations. This will not work as lots of options (including 
> annotations) are not yet supported for Material Charts 
> <https://github.com/google/google-visualization-issues/issues/2143>. Your 
> best bet would probably be to use a Classic Chart (from the 'corechart' 
> package).
>
> On Wed, Jan 20, 2016 at 12:57 PM Shahid Majeed <shahid...@gmail.com 
> > wrote:
>
>> Hi,
>> I am trying to add sales values inside the bar of the google bar chart. 
>> But did not succeed. Please can someone help me. I have following markup.
>>
>> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" 
>> AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
>> > runat="Server">
>> https://www.google.com/jsapi</a>
>> ">
>> 
>> google.load('visualization', '1', { packages: ['bar'] });
>> google.setOnLoadCallback(drawAntalChart);
>> function drawAntalChart() {
>> var data = google.visualization.arrayToDataTable([
>> ['Projektledare', 'Sale', 'Avg Sale'],
>> ['Wiberg', 26030, 13015],
>> ['Andersson ', 461690, 19237.08],
>> ['Ranheimer', 304045, 33782.78]]);
>>
>> var options = { chart: { title: 'Projektledning: Sales' } };
>> var chart = new 
>> google.charts.Bar(document.getElementById('div_chart')); chart.draw(data, 
>> options);
>> } 
>> 
>> > runat="Server">
>> 
>> 
>>
>>
>> Picture attached how the graph look.
>>
>> Thanks in advance
>>
>> -- 
>> 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-visua...@googlegroups.com 
>> .
>> Visit this group at 
>> https://groups.google.com/group/google-visualization-api.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-visualization-api/5d68bf0e-eb70-46ab-8ff1-823b1663e48a%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-visualization-api/5d68bf0e-eb70-46ab-8ff1-823b1663e48a%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
>
> *[image: unnamed.gif]• Sergey Grabkovsky• Software Engineer• Google, Inc• 
> gra...@google.com *
>
>

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/6c052bbc-47a9-4231-91f2-89a0b54334b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Nothing in jsfiddle.

On Wednesday, January 20, 2016 at 9:18:42 PM UTC+1, Daniel LaLiberte wrote:
>
> Looking at your image again, what you really want is what we call a 
> 'column' chart.  There are several examples on the ColumnChart 
> documentation page (
> https://developers.google.com/chart/interactive/docs/gallery/columnchart), 
> but you can see one running that has two series (like your data) in 
> jsfiddle here: https://jsfiddle.net/api/post/library/pure/
>
>
> On Wed, Jan 20, 2016 at 3:14 PM, Shahid Majeed <shahid...@gmail.com 
> > wrote:
>
>> Hi Daniel,
>> Thanks for your quick response. I am very new to google chart. It would 
>> be very helpful if you just give me any sample. I really appreciate your 
>> help thanks alot.
>>
>>
>>
>> On Wednesday, January 20, 2016 at 9:07:45 PM UTC+1, Daniel LaLiberte 
>> wrote:
>>>
>>> Hi Shahid,
>>>
>>> The 'bar' package is for the material chart.  So use 
>>> google.visualization.BarChart instead, and by the way, you can add the 
>>> option theme: 'material' if you want the material colors and fonts.  You 
>>> only need to load the 'corechart' package to get BarChart.
>>>
>>> On Wed, Jan 20, 2016 at 3:00 PM, Shahid Majeed <shahid...@gmail.com> 
>>> wrote:
>>>
>>>> Hi sergey,
>>>> I have change package setting like this 
>>>> google.load('visualization', '1', { packages: ['corechart', 'bar'] });
>>>>
>>>> But it does not effect on it.
>>>> Do you have any sample code how i can achieve my requirement.
>>>>
>>>> What exactly i want to acheive is that i have to compare the all 
>>>> project leaders. How much they sale and avg sale. As you see in my picture 
>>>> attached. I have project leaders and their sale and avg sale values on the 
>>>> graph.
>>>>
>>>> I want to show sale and avg sale values in the bars. so that it is 
>>>> visible we dont need to take the mouse curse to see the actually value.
>>>> second is it possible to show the graph in 3D.
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>> On Wednesday, January 20, 2016 at 7:19:21 PM UTC+1, Sergey wrote:
>>>>>
>>>>> Hi Shahid,
>>>>>
>>>>> It looks like you're using the Material Bar Chart, and are attempting 
>>>>> to use annotations. This will not work as lots of options (including 
>>>>> annotations) are not yet supported for Material Charts 
>>>>> <https://github.com/google/google-visualization-issues/issues/2143>. 
>>>>> Your best bet would probably be to use a Classic Chart (from the 
>>>>> 'corechart' package).
>>>>>
>>>>> On Wed, Jan 20, 2016 at 12:57 PM Shahid Majeed <shahid...@gmail.com> 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>> I am trying to add sales values inside the bar of the google bar 
>>>>>> chart. But did not succeed. Please can someone help me. I have following 
>>>>>> markup.
>>>>>>
>>>>>> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" 
>>>>>> AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
>>>>>> >>>>> runat="Server">
>>>>>> https://www.google.com/jsapi</a>
>>>>>> ">
>>>>>> 
>>>>>> google.load('visualization', '1', { packages: ['bar'] });
>>>>>> google.setOnLoadCallback(drawAntalChart);
>>>>>> function drawAntalChart() {
>>>>>> var data = google.visualization.arrayToDataTable([
>>>>>> ['Projektledare', 'Sale', 'Avg Sale'],
>>>>>> ['Wiberg', 26030, 13015],
>>>>>> ['Andersson ', 461690, 19237.08],
>>>>>> ['Ranheimer', 304045, 33782.78]]);
>>>>>>
>>>>>> var options = { chart: { title: 'Projektledning: Sales' } 
>>>>>> };
>>>>>> var chart = new 
>>>>>> google.charts.Bar(document.getElementById('div_chart')); 
>>>>>> chart.draw(data, 
>>>>>> options);
>>>>>> } 
>>>>>> 
>>>>>> >>

Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Hi Daniel,
I have change the visualization of the chart now bars render horizontally 
instead vertical. 


On Wednesday, January 20, 2016 at 9:07:45 PM UTC+1, Daniel LaLiberte wrote:
>
> Hi Shahid,
>
> The 'bar' package is for the material chart.  So use 
> google.visualization.BarChart instead, and by the way, you can add the 
> option theme: 'material' if you want the material colors and fonts.  You 
> only need to load the 'corechart' package to get BarChart.
>
> On Wed, Jan 20, 2016 at 3:00 PM, Shahid Majeed <shahid...@gmail.com 
> > wrote:
>
>> Hi sergey,
>> I have change package setting like this 
>> google.load('visualization', '1', { packages: ['corechart', 'bar'] });
>>
>> But it does not effect on it.
>> Do you have any sample code how i can achieve my requirement.
>>
>> What exactly i want to acheive is that i have to compare the all project 
>> leaders. How much they sale and avg sale. As you see in my picture 
>> attached. I have project leaders and their sale and avg sale values on the 
>> graph.
>>
>> I want to show sale and avg sale values in the bars. so that it is 
>> visible we dont need to take the mouse curse to see the actually value.
>> second is it possible to show the graph in 3D.
>>
>> Thanks in advance.
>>
>>
>> On Wednesday, January 20, 2016 at 7:19:21 PM UTC+1, Sergey wrote:
>>>
>>> Hi Shahid,
>>>
>>> It looks like you're using the Material Bar Chart, and are attempting to 
>>> use annotations. This will not work as lots of options (including 
>>> annotations) are not yet supported for Material Charts 
>>> <https://github.com/google/google-visualization-issues/issues/2143>. 
>>> Your best bet would probably be to use a Classic Chart (from the 
>>> 'corechart' package).
>>>
>>> On Wed, Jan 20, 2016 at 12:57 PM Shahid Majeed <shahid...@gmail.com> 
>>> wrote:
>>>
>>>> Hi,
>>>> I am trying to add sales values inside the bar of the google bar chart. 
>>>> But did not succeed. Please can someone help me. I have following markup.
>>>>
>>>> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" 
>>>> AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
>>>> >>> runat="Server">
>>>> https://www.google.com/jsapi</a>
>>>> ">
>>>> 
>>>> google.load('visualization', '1', { packages: ['bar'] });
>>>> google.setOnLoadCallback(drawAntalChart);
>>>> function drawAntalChart() {
>>>> var data = google.visualization.arrayToDataTable([
>>>> ['Projektledare', 'Sale', 'Avg Sale'],
>>>> ['Wiberg', 26030, 13015],
>>>> ['Andersson ', 461690, 19237.08],
>>>> ['Ranheimer', 304045, 33782.78]]);
>>>>
>>>> var options = { chart: { title: 'Projektledning: Sales' } };
>>>> var chart = new 
>>>> google.charts.Bar(document.getElementById('div_chart')); chart.draw(data, 
>>>> options);
>>>> } 
>>>> 
>>>> >>> runat="Server">
>>>> 
>>>> 
>>>>
>>>>
>>>> Picture attached how the graph look.
>>>>
>>>> Thanks in advance
>>>>
>>>> -- 
>>>> 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-visua...@googlegroups.com.
>>>> Visit this group at 
>>>> https://groups.google.com/group/google-visualization-api.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/google-visualization-api/5d68bf0e-eb70-46ab-8ff1-823b1663e48a%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/google-visualization-api/5d68bf0e-eb70-46ab-8ff1-823b1663e48a%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>>>
>>> *[image: unnamed.gif]• Sergey Grabkovsky• Software Engineer• Google, 
>>

Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
I have added the dataview in my 
jsfiddle https://jsfiddle.net/shahidmajeed/y72yzgsy/4/
Now i am able to see the sales value for each bar. 

But i did not see the avg sales value.

I havent understand the setcolum setting. I think its have to do with this 
setting to show the avg sales value as well on the graph.

could you just check what to do for my avg. sales value.

Thanks alot.


On Wednesday, January 20, 2016 at 10:16:27 PM UTC+1, Daniel LaLiberte wrote:
>
> Sergey mentioned Annotations.  You would need to add 'annotation' role 
> columns to your chart.  See 
> https://developers.google.com/chart/interactive/docs/roles
> There is a relevant example here: 
> https://developers.google.com/chart/interactive/docs/gallery/columnchart#labeling-columns
>
> On Wed, Jan 20, 2016 at 4:04 PM, Shahid Majeed <shahid...@gmail.com 
> > wrote:
>
>> Hi Daniel,
>> I have prepare my jsfiddle https://jsfiddle.net/shahidmajeed/dqxL2Lh2/. 
>> what setting i have to do to sale values in side the bars.
>>
>>
>> On Wednesday, January 20, 2016 at 9:38:47 PM UTC+1, Shahid Majeed wrote:
>>>
>>> Thanks fiddle is working now. But i am trying to produce the graph look 
>>> like attached picture. Only problem is that i dont know how i can insert 
>>> sales values inside bars in the graph.
>>>
>>> On Wednesday, January 20, 2016 at 9:26:54 PM UTC+1, Daniel LaLiberte 
>>> wrote:
>>>>
>>>> Oops.. sorry, forgot to Save it:  
>>>> https://jsfiddle.net/dlaliberte/vz3byoec/
>>>>
>>>> On Wed, Jan 20, 2016 at 3:25 PM, Shahid Majeed <shahid...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Nothing in jsfiddle.
>>>>>
>>>>> On Wednesday, January 20, 2016 at 9:18:42 PM UTC+1, Daniel LaLiberte 
>>>>> wrote:
>>>>>>
>>>>>> Looking at your image again, what you really want is what we call a 
>>>>>> 'column' chart.  There are several examples on the ColumnChart 
>>>>>> documentation page (
>>>>>> https://developers.google.com/chart/interactive/docs/gallery/columnchart),
>>>>>>  
>>>>>> but you can see one running that has two series (like your data) in 
>>>>>> jsfiddle here: https://jsfiddle.net/api/post/library/pure/
>>>>>>
>>>>>>
>>>>>> On Wed, Jan 20, 2016 at 3:14 PM, Shahid Majeed <shahid...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Daniel,
>>>>>>> Thanks for your quick response. I am very new to google chart. It 
>>>>>>> would be very helpful if you just give me any sample. I really 
>>>>>>> appreciate 
>>>>>>> your help thanks alot.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, January 20, 2016 at 9:07:45 PM UTC+1, Daniel LaLiberte 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi Shahid,
>>>>>>>>
>>>>>>>> The 'bar' package is for the material chart.  So use 
>>>>>>>> google.visualization.BarChart instead, and by the way, you can add the 
>>>>>>>> option theme: 'material' if you want the material colors and fonts.  
>>>>>>>> You 
>>>>>>>> only need to load the 'corechart' package to get BarChart.
>>>>>>>>
>>>>>>>> On Wed, Jan 20, 2016 at 3:00 PM, Shahid Majeed <shahid...@gmail.com
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> Hi sergey,
>>>>>>>>> I have change package setting like this 
>>>>>>>>> google.load('visualization', '1', { packages: ['corechart', 'bar'] 
>>>>>>>>> });
>>>>>>>>>
>>>>>>>>> But it does not effect on it.
>>>>>>>>> Do you have any sample code how i can achieve my requirement.
>>>>>>>>>
>>>>>>>>> What exactly i want to acheive is that i have to compare the all 
>>>>>>>>> project leaders. How much they sale and avg sale. As you see in my 
>>>>>>>>> picture 
>>>>>>>>> attached. I have project leaders and their sale and avg sale values 
>>>>>>>>> on the 
>>>>>>>>> graph.
>

Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Hi Daniel,
Thanks for your quick response. I am very new to google chart. It would be 
very helpful if you just give me any sample. I really appreciate your help 
thanks alot.



On Wednesday, January 20, 2016 at 9:07:45 PM UTC+1, Daniel LaLiberte wrote:
>
> Hi Shahid,
>
> The 'bar' package is for the material chart.  So use 
> google.visualization.BarChart instead, and by the way, you can add the 
> option theme: 'material' if you want the material colors and fonts.  You 
> only need to load the 'corechart' package to get BarChart.
>
> On Wed, Jan 20, 2016 at 3:00 PM, Shahid Majeed <shahid...@gmail.com 
> > wrote:
>
>> Hi sergey,
>> I have change package setting like this 
>> google.load('visualization', '1', { packages: ['corechart', 'bar'] });
>>
>> But it does not effect on it.
>> Do you have any sample code how i can achieve my requirement.
>>
>> What exactly i want to acheive is that i have to compare the all project 
>> leaders. How much they sale and avg sale. As you see in my picture 
>> attached. I have project leaders and their sale and avg sale values on the 
>> graph.
>>
>> I want to show sale and avg sale values in the bars. so that it is 
>> visible we dont need to take the mouse curse to see the actually value.
>> second is it possible to show the graph in 3D.
>>
>> Thanks in advance.
>>
>>
>> On Wednesday, January 20, 2016 at 7:19:21 PM UTC+1, Sergey wrote:
>>>
>>> Hi Shahid,
>>>
>>> It looks like you're using the Material Bar Chart, and are attempting to 
>>> use annotations. This will not work as lots of options (including 
>>> annotations) are not yet supported for Material Charts 
>>> <https://github.com/google/google-visualization-issues/issues/2143>. 
>>> Your best bet would probably be to use a Classic Chart (from the 
>>> 'corechart' package).
>>>
>>> On Wed, Jan 20, 2016 at 12:57 PM Shahid Majeed <shahid...@gmail.com> 
>>> wrote:
>>>
>>>> Hi,
>>>> I am trying to add sales values inside the bar of the google bar chart. 
>>>> But did not succeed. Please can someone help me. I have following markup.
>>>>
>>>> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" 
>>>> AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
>>>> >>> runat="Server">
>>>> https://www.google.com/jsapi</a>
>>>> ">
>>>> 
>>>> google.load('visualization', '1', { packages: ['bar'] });
>>>> google.setOnLoadCallback(drawAntalChart);
>>>> function drawAntalChart() {
>>>> var data = google.visualization.arrayToDataTable([
>>>> ['Projektledare', 'Sale', 'Avg Sale'],
>>>> ['Wiberg', 26030, 13015],
>>>> ['Andersson ', 461690, 19237.08],
>>>> ['Ranheimer', 304045, 33782.78]]);
>>>>
>>>> var options = { chart: { title: 'Projektledning: Sales' } };
>>>> var chart = new 
>>>> google.charts.Bar(document.getElementById('div_chart')); chart.draw(data, 
>>>> options);
>>>> } 
>>>> 
>>>> >>> runat="Server">
>>>> 
>>>> 
>>>>
>>>>
>>>> Picture attached how the graph look.
>>>>
>>>> Thanks in advance
>>>>
>>>> -- 
>>>> 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-visua...@googlegroups.com.
>>>> Visit this group at 
>>>> https://groups.google.com/group/google-visualization-api.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/google-visualization-api/5d68bf0e-eb70-46ab-8ff1-823b1663e48a%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/google-visualization-api/5d68bf0e-eb70-46ab-8ff1-823b1663e48a%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>>>
>>> *[im

Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Thanks fiddle is working now. But i am trying to produce the graph look 
like attached picture. Only problem is that i dont know how i can insert 
sales values inside bars in the graph.

On Wednesday, January 20, 2016 at 9:26:54 PM UTC+1, Daniel LaLiberte wrote:
>
> Oops.. sorry, forgot to Save it:  
> https://jsfiddle.net/dlaliberte/vz3byoec/
>
> On Wed, Jan 20, 2016 at 3:25 PM, Shahid Majeed <shahid...@gmail.com 
> > wrote:
>
>> Nothing in jsfiddle.
>>
>> On Wednesday, January 20, 2016 at 9:18:42 PM UTC+1, Daniel LaLiberte 
>> wrote:
>>>
>>> Looking at your image again, what you really want is what we call a 
>>> 'column' chart.  There are several examples on the ColumnChart 
>>> documentation page (
>>> https://developers.google.com/chart/interactive/docs/gallery/columnchart), 
>>> but you can see one running that has two series (like your data) in 
>>> jsfiddle here: https://jsfiddle.net/api/post/library/pure/
>>>
>>>
>>> On Wed, Jan 20, 2016 at 3:14 PM, Shahid Majeed <shahid...@gmail.com> 
>>> wrote:
>>>
>>>> Hi Daniel,
>>>> Thanks for your quick response. I am very new to google chart. It would 
>>>> be very helpful if you just give me any sample. I really appreciate your 
>>>> help thanks alot.
>>>>
>>>>
>>>>
>>>> On Wednesday, January 20, 2016 at 9:07:45 PM UTC+1, Daniel LaLiberte 
>>>> wrote:
>>>>>
>>>>> Hi Shahid,
>>>>>
>>>>> The 'bar' package is for the material chart.  So use 
>>>>> google.visualization.BarChart instead, and by the way, you can add the 
>>>>> option theme: 'material' if you want the material colors and fonts.  You 
>>>>> only need to load the 'corechart' package to get BarChart.
>>>>>
>>>>> On Wed, Jan 20, 2016 at 3:00 PM, Shahid Majeed <shahid...@gmail.com> 
>>>>> wrote:
>>>>>
>>>>>> Hi sergey,
>>>>>> I have change package setting like this 
>>>>>> google.load('visualization', '1', { packages: ['corechart', 'bar'] 
>>>>>> });
>>>>>>
>>>>>> But it does not effect on it.
>>>>>> Do you have any sample code how i can achieve my requirement.
>>>>>>
>>>>>> What exactly i want to acheive is that i have to compare the all 
>>>>>> project leaders. How much they sale and avg sale. As you see in my 
>>>>>> picture 
>>>>>> attached. I have project leaders and their sale and avg sale values on 
>>>>>> the 
>>>>>> graph.
>>>>>>
>>>>>> I want to show sale and avg sale values in the bars. so that it is 
>>>>>> visible we dont need to take the mouse curse to see the actually value.
>>>>>> second is it possible to show the graph in 3D.
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>>
>>>>>> On Wednesday, January 20, 2016 at 7:19:21 PM UTC+1, Sergey wrote:
>>>>>>>
>>>>>>> Hi Shahid,
>>>>>>>
>>>>>>> It looks like you're using the Material Bar Chart, and are 
>>>>>>> attempting to use annotations. This will not work as lots of 
>>>>>>> options (including annotations) are not yet supported for Material 
>>>>>>> Charts 
>>>>>>> <https://github.com/google/google-visualization-issues/issues/2143>. 
>>>>>>> Your best bet would probably be to use a Classic Chart (from the 
>>>>>>> 'corechart' package).
>>>>>>>
>>>>>>> On Wed, Jan 20, 2016 at 12:57 PM Shahid Majeed <shahid...@gmail.com> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> I am trying to add sales values inside the bar of the google bar 
>>>>>>>> chart. But did not succeed. Please can someone help me. I have 
>>>>>>>> following 
>>>>>>>> markup.
>>>>>>>>
>>>>>>>> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" 
>>>>>>>> AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
>>>>>>>> >

Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Hi Daniel,
I have prepare my jsfiddle https://jsfiddle.net/shahidmajeed/dqxL2Lh2/. 
what setting i have to do to sale values in side the bars.

On Wednesday, January 20, 2016 at 9:38:47 PM UTC+1, Shahid Majeed wrote:
>
> Thanks fiddle is working now. But i am trying to produce the graph look 
> like attached picture. Only problem is that i dont know how i can insert 
> sales values inside bars in the graph.
>
> On Wednesday, January 20, 2016 at 9:26:54 PM UTC+1, Daniel LaLiberte wrote:
>>
>> Oops.. sorry, forgot to Save it:  
>> https://jsfiddle.net/dlaliberte/vz3byoec/
>>
>> On Wed, Jan 20, 2016 at 3:25 PM, Shahid Majeed <shahid...@gmail.com> 
>> wrote:
>>
>>> Nothing in jsfiddle.
>>>
>>> On Wednesday, January 20, 2016 at 9:18:42 PM UTC+1, Daniel LaLiberte 
>>> wrote:
>>>>
>>>> Looking at your image again, what you really want is what we call a 
>>>> 'column' chart.  There are several examples on the ColumnChart 
>>>> documentation page (
>>>> https://developers.google.com/chart/interactive/docs/gallery/columnchart), 
>>>> but you can see one running that has two series (like your data) in 
>>>> jsfiddle here: https://jsfiddle.net/api/post/library/pure/
>>>>
>>>>
>>>> On Wed, Jan 20, 2016 at 3:14 PM, Shahid Majeed <shahid...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Hi Daniel,
>>>>> Thanks for your quick response. I am very new to google chart. It 
>>>>> would be very helpful if you just give me any sample. I really appreciate 
>>>>> your help thanks alot.
>>>>>
>>>>>
>>>>>
>>>>> On Wednesday, January 20, 2016 at 9:07:45 PM UTC+1, Daniel LaLiberte 
>>>>> wrote:
>>>>>>
>>>>>> Hi Shahid,
>>>>>>
>>>>>> The 'bar' package is for the material chart.  So use 
>>>>>> google.visualization.BarChart instead, and by the way, you can add the 
>>>>>> option theme: 'material' if you want the material colors and fonts.  You 
>>>>>> only need to load the 'corechart' package to get BarChart.
>>>>>>
>>>>>> On Wed, Jan 20, 2016 at 3:00 PM, Shahid Majeed <shahid...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi sergey,
>>>>>>> I have change package setting like this 
>>>>>>> google.load('visualization', '1', { packages: ['corechart', 'bar'] 
>>>>>>> });
>>>>>>>
>>>>>>> But it does not effect on it.
>>>>>>> Do you have any sample code how i can achieve my requirement.
>>>>>>>
>>>>>>> What exactly i want to acheive is that i have to compare the all 
>>>>>>> project leaders. How much they sale and avg sale. As you see in my 
>>>>>>> picture 
>>>>>>> attached. I have project leaders and their sale and avg sale values on 
>>>>>>> the 
>>>>>>> graph.
>>>>>>>
>>>>>>> I want to show sale and avg sale values in the bars. so that it is 
>>>>>>> visible we dont need to take the mouse curse to see the actually value.
>>>>>>> second is it possible to show the graph in 3D.
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, January 20, 2016 at 7:19:21 PM UTC+1, Sergey wrote:
>>>>>>>>
>>>>>>>> Hi Shahid,
>>>>>>>>
>>>>>>>> It looks like you're using the Material Bar Chart, and are 
>>>>>>>> attempting to use annotations. This will not work as lots of 
>>>>>>>> options (including annotations) are not yet supported for Material 
>>>>>>>> Charts 
>>>>>>>> <https://github.com/google/google-visualization-issues/issues/2143>. 
>>>>>>>> Your best bet would probably be to use a Classic Chart (from the 
>>>>>>>> 'corechart' package).
>>>>>>>>
>>>>>>>> On Wed, Jan 20, 2016 at 12:57 PM Shahid Majeed <shahid...@gmail.com> 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>> I am trying to add 

Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
I am really appreciate your help, Its look very good. Only one thing is 
left is it possible i can show the number in the form of currency. i have 
tried to set type: "string" to type:"currency" but its show Type mismatch. 
Value 26030 does not match type currency.


On Wednesday, January 20, 2016 at 10:32:01 PM UTC+1, Daniel LaLiberte wrote:
>
> Sorry.. forgot to change the sourceColumn:  
> https://jsfiddle.net/dlaliberte/y72yzgsy/6/
>
> On Wed, Jan 20, 2016 at 4:30 PM, Daniel LaLiberte <dlali...@google.com 
> > wrote:
>
>> You need another annotation column for the second series.  I made the 
>> change here: https://jsfiddle.net/dlaliberte/y72yzgsy/5/
>>
>> On Wed, Jan 20, 2016 at 4:21 PM, Shahid Majeed <shahid...@gmail.com 
>> > wrote:
>>
>>> I have added the dataview in my jsfiddle 
>>> https://jsfiddle.net/shahidmajeed/y72yzgsy/4/
>>> Now i am able to see the sales value for each bar. 
>>>
>>> But i did not see the avg sales value.
>>>
>>> I havent understand the setcolum setting. I think its have to do with 
>>> this setting to show the avg sales value as well on the graph.
>>>
>>> could you just check what to do for my avg. sales value.
>>>
>>> Thanks alot.
>>>
>>>
>>> On Wednesday, January 20, 2016 at 10:16:27 PM UTC+1, Daniel LaLiberte 
>>> wrote:
>>>>
>>>> Sergey mentioned Annotations.  You would need to add 'annotation' role 
>>>> columns to your chart.  See 
>>>> https://developers.google.com/chart/interactive/docs/roles
>>>> There is a relevant example here: 
>>>> https://developers.google.com/chart/interactive/docs/gallery/columnchart#labeling-columns
>>>>
>>>> On Wed, Jan 20, 2016 at 4:04 PM, Shahid Majeed <shahid...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Hi Daniel,
>>>>> I have prepare my jsfiddle https://jsfiddle.net/shahidmajeed/dqxL2Lh2/. 
>>>>> what setting i have to do to sale values in side the bars.
>>>>>
>>>>>
>>>>> On Wednesday, January 20, 2016 at 9:38:47 PM UTC+1, Shahid Majeed 
>>>>> wrote:
>>>>>>
>>>>>> Thanks fiddle is working now. But i am trying to produce the graph 
>>>>>> look like attached picture. Only problem is that i dont know how i can 
>>>>>> insert sales values inside bars in the graph.
>>>>>>
>>>>>> On Wednesday, January 20, 2016 at 9:26:54 PM UTC+1, Daniel LaLiberte 
>>>>>> wrote:
>>>>>>>
>>>>>>> Oops.. sorry, forgot to Save it:  
>>>>>>> https://jsfiddle.net/dlaliberte/vz3byoec/
>>>>>>>
>>>>>>> On Wed, Jan 20, 2016 at 3:25 PM, Shahid Majeed <shahid...@gmail.com> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Nothing in jsfiddle.
>>>>>>>>
>>>>>>>> On Wednesday, January 20, 2016 at 9:18:42 PM UTC+1, Daniel 
>>>>>>>> LaLiberte wrote:
>>>>>>>>>
>>>>>>>>> Looking at your image again, what you really want is what we call 
>>>>>>>>> a 'column' chart.  There are several examples on the ColumnChart 
>>>>>>>>> documentation page (
>>>>>>>>> https://developers.google.com/chart/interactive/docs/gallery/columnchart),
>>>>>>>>>  
>>>>>>>>> but you can see one running that has two series (like your data) in 
>>>>>>>>> jsfiddle here: https://jsfiddle.net/api/post/library/pure/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Jan 20, 2016 at 3:14 PM, Shahid Majeed <
>>>>>>>>> shahid...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Daniel,
>>>>>>>>>> Thanks for your quick response. I am very new to google chart. It 
>>>>>>>>>> would be very helpful if you just give me any sample. I really 
>>>>>>>>>> appreciate 
>>>>>>>>>> your help thanks alot.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wednesday, January 20, 2016 at 9:07:45 PM UTC

Re: [visualization-api] How to add sales value inside the bar of google bar chart

2016-01-20 Thread Shahid Majeed
Perfect thank you Daniel. my graph look excellent and its all because of 
your support. Thanks Alot https://jsfiddle.net/shahidmajeed/y72yzgsy/7/

On Wednesday, January 20, 2016 at 10:51:11 PM UTC+1, Daniel LaLiberte wrote:
>
> Currently, you'll need to apply a NumberFormat to each value:  
>   
> https://developers.google.com/chart/interactive/docs/reference#numberformatter
>
> On Wed, Jan 20, 2016 at 4:38 PM, Shahid Majeed <shahid...@gmail.com 
> > wrote:
>
>> I am really appreciate your help, Its look very good. Only one thing is 
>> left is it possible i can show the number in the form of currency. i have 
>> tried to set type: "string" to type:"currency" but its show Type 
>> mismatch. Value 26030 does not match type currency.
>>
>>
>> On Wednesday, January 20, 2016 at 10:32:01 PM UTC+1, Daniel LaLiberte 
>> wrote:
>>>
>>> Sorry.. forgot to change the sourceColumn:  
>>> https://jsfiddle.net/dlaliberte/y72yzgsy/6/
>>>
>>> On Wed, Jan 20, 2016 at 4:30 PM, Daniel LaLiberte <dlali...@google.com> 
>>> wrote:
>>>
>>>> You need another annotation column for the second series.  I made the 
>>>> change here: https://jsfiddle.net/dlaliberte/y72yzgsy/5/
>>>>
>>>> On Wed, Jan 20, 2016 at 4:21 PM, Shahid Majeed <shahid...@gmail.com> 
>>>> wrote:
>>>>
>>>>> I have added the dataview in my jsfiddle 
>>>>> https://jsfiddle.net/shahidmajeed/y72yzgsy/4/
>>>>> Now i am able to see the sales value for each bar. 
>>>>>
>>>>> But i did not see the avg sales value.
>>>>>
>>>>> I havent understand the setcolum setting. I think its have to do with 
>>>>> this setting to show the avg sales value as well on the graph.
>>>>>
>>>>> could you just check what to do for my avg. sales value.
>>>>>
>>>>> Thanks alot.
>>>>>
>>>>>
>>>>> On Wednesday, January 20, 2016 at 10:16:27 PM UTC+1, Daniel LaLiberte 
>>>>> wrote:
>>>>>>
>>>>>> Sergey mentioned Annotations.  You would need to add 'annotation' 
>>>>>> role columns to your chart.  See 
>>>>>> https://developers.google.com/chart/interactive/docs/roles
>>>>>> There is a relevant example here: 
>>>>>> https://developers.google.com/chart/interactive/docs/gallery/columnchart#labeling-columns
>>>>>>
>>>>>> On Wed, Jan 20, 2016 at 4:04 PM, Shahid Majeed <shahid...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Daniel,
>>>>>>> I have prepare my jsfiddle 
>>>>>>> https://jsfiddle.net/shahidmajeed/dqxL2Lh2/. what setting i have to 
>>>>>>> do to sale values in side the bars.
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, January 20, 2016 at 9:38:47 PM UTC+1, Shahid Majeed 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Thanks fiddle is working now. But i am trying to produce the graph 
>>>>>>>> look like attached picture. Only problem is that i dont know how i can 
>>>>>>>> insert sales values inside bars in the graph.
>>>>>>>>
>>>>>>>> On Wednesday, January 20, 2016 at 9:26:54 PM UTC+1, Daniel 
>>>>>>>> LaLiberte wrote:
>>>>>>>>>
>>>>>>>>> Oops.. sorry, forgot to Save it:  
>>>>>>>>> https://jsfiddle.net/dlaliberte/vz3byoec/
>>>>>>>>>
>>>>>>>>> On Wed, Jan 20, 2016 at 3:25 PM, Shahid Majeed <
>>>>>>>>> shahid...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Nothing in jsfiddle.
>>>>>>>>>>
>>>>>>>>>> On Wednesday, January 20, 2016 at 9:18:42 PM UTC+1, Daniel 
>>>>>>>>>> LaLiberte wrote:
>>>>>>>>>>>
>>>>>>>>>>> Looking at your image again, what you really want is what we 
>>>>>>>>>>> call a 'column' chart.  There are several examples on the 
>>>>>>>>>>> ColumnChart 
>>>>>>>>>>> documentation page (
>>>>>>>>>>> https://developers.googl

Re: [visualization-api] How to setup Y Axis steps for bar chart

2015-04-01 Thread Shahid Majeed
Hi,
yes avg sale derived from the sale. In my reply i removed the secondary 
axis. Now i am wondering is it possible to setup ticks on y axis like 0 
100K, 200K and so on.

On Wednesday, April 1, 2015 at 10:28:47 PM UTC+2, Sergey wrote:

 Hi, I'm not really sure what you're trying to do, but I'm not entirely 
 convinced that you need two axes. It seems like your data is roughly of the 
 same scale (in fact, I would assume that Avg Sale is derived from Sale), so 
 the chart should just look fine without a secondary axis.

 On Wed, Apr 1, 2015 at 4:24 PM Shahid Majeed shahid...@gmail.com 
 javascript: wrote:

 Hi,
 I am new to google chart api. I am trying to create a bar chart with Sale 
 and Avg sale series. I Succeed to create chart but i tried allot to set the 
 Y-axis steps to make the chart sensible.

 If you check my chart left Y-axis (Sale) range from 0 to 800K and right 
 Y-axis(Avg) range from 0 to150K.
 Most of the columns shows the average column higher than sale because its 
 draw according to value. 

 Any suggestion please how to make this sensible.

 Thanks in advance

 Here is my script
 script type='text/javascript'  
 google.load('visualization', '1', {packages: ['bar'
 ]});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data = google.visualization.arrayToDataTable([  
 ['Projektledare','Sale','Avg'],['Anstenius',53575,
 13393.75],['Björnaes',147395,13399.55],['Hammarstrom ',80810,26936.67],[
 'Fuglsang',112080,56040],['Wilsletf',779635,41033.42],['Ranheimer',287151
 ,143575.5]]); var options = {chart: { title: 'Projektledning: Sales'},
 series: {
 0: { axis: 'Sale' }, 
 1: { axis: 'Avg' }
   },axes: {
 y: {
   Sale: {label: 'Sale'},
   Avg: {side: 'right', label: 'Avg 
 Sale'}
 }
   }};var chart = new google.charts.
 Bar(document.getElementById('div_chart'));chart.draw(data, options);} 
 /script
 div id=div_chart style=height: 325px; 
 text-align: left;/div



 Here how the chart look like

 http://i57.tinypic.com/16gfjhs.jpg

  -- 
 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 
 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: How to setup Y Axis steps for bar chart

2015-04-01 Thread Shahid Majeed
Correct but still chart does not come up
script type='text/javascript'  
google.load('visualization', '1', {packages: [
'corechart','bar']});
google.setOnLoadCallback(drawSaleChart);
 
function drawSaleChart() { 
var data = google.visualization.arrayToDataTable([  
['Projektledare','Sale','Avg'],['Ahlenius',0,0],['emma',
54200,27100],['Anstenius',145105,16122.78],['ida',0,0],['Björnaes',396190,
13206.33],['Hammarstrom ',207230,12951.88],['Fuglsang',851005,20756.22],[
'Strand',817710,32708.4],['Wiberg',0,0],['Wilsletf',779635,41033.42],[
'Bergseije',475,475],['Samuelsson',17535,17535],['Dijkstra',0,0],[
'Ranheimer',287151,143575.5]]); var options = {title: 'Projektledning: 
Sales'};var chart = new google.charts.ColumnChart(document.getElementById(
'div_chart'));chart.draw(data, options);} /script
div id=div_chart style=height: 325px; text-
align: left;/div



On Wednesday, April 1, 2015 at 10:52:25 PM UTC+2, Sergey wrote:

 The title is specified differently for Classic Charts. It needs to be a 
 top-level option. That means that your options structure should be as 
 follows:
 var options = {title: 'Projektledning: Sales'};

 On Wed, Apr 1, 2015 at 4:49 PM Shahid Majeed shahid...@gmail.com 
 javascript: wrote:

 I tried to update my script according to the example but now its does 
 shows on my page.
 Here is my updated script
 script type='text/javascript'  
 google.load('visualization', '1', {packages: [
 'corechart','bar']});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data = google.visualization.arrayToDataTable([  
 ['Projektledare','Sale','Avg'],['Ahlenius',0,0],[
 'emma',54200,27100],['Anstenius',145105,16122.78],['ida',0,0],['Björnaes'
 ,396190,13206.33],['Hammarstrom ',207230,12951.88],['Fuglsang',851005,
 20756.22],['Strand',817710,32708.4],['Wiberg',0,0],['Wilsletf',779635,
 41033.42],['Bergseije',475,475],['Samuelsson',17535,17535],['Dijkstra',0,
 0],['Ranheimer',287151,143575.5]]); var options = {chart: { title: 
 'Projektledning: 
 Sales'}};var chart = new google.charts.ColumnChart(document.
 getElementById('div_chart'));chart.draw(data, options);} /script
 div id=div_chart style=height: 325px; 
 text-align: left;/div



 On Wednesday, April 1, 2015 at 10:43:08 PM UTC+2, Sergey wrote:

 Yes. Here is an example: https://jsfiddle.net/fggkgoau/

 On Wed, Apr 1, 2015 at 4:41 PM Shahid Majeed shahid...@gmail.com 
 wrote:

 Is it possible i use two series in regular column chart. On the API 
 page i only see one series example. Do you refer me an example related to 
 my data.
 Thanks


 On Wednesday, April 1, 2015 at 10:33:39 PM UTC+2, Sergey wrote:

 I think that if your two data measures have the same scale, showing 
 them on separate axes is misleading. If the average column looks tiny, 
 then 
 that's the nature of the data. If I misunderstood the nature of your 
 data, 
 and they are on different scales, then putting them on separate axes was 
 the right decision, and I apologize.

 There is currently no way to control the ticks with that sort of 
 granularity. The regular ColumnChart supports custom ticks, so you could 
 use that.

 On Wed, Apr 1, 2015 at 4:30 PM Shahid Majeed shahid...@gmail.com 
 wrote:


 https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG
 If i removed the series and y axis option then my chart look like 
 this. Now problem is I have large sale value as compared to average. 
 Average column look very tiny. Is it possible i can set the interval min 
 0 
 and then gridlines increase by specific interval such as 100K 


 https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG


 On Wednesday, April 1, 2015 at 10:24:40 PM UTC+2, Shahid Majeed wrote:

 Hi,
 I am new to google chart api. I am trying to create a bar chart with 
 Sale and Avg sale series. I Succeed to create chart but i tried allot 
 to 
 set the Y-axis steps to make the chart sensible.

 If you check my chart left Y-axis (Sale) range from 0 to 800K and 
 right Y-axis(Avg) range from 0 to150K.
 Most of the columns shows the average column higher than sale 
 because its draw according to value. 

 Any suggestion please how to make this sensible.

 Thanks in advance

 Here is my script
 script type='text/javascript'  
 google.load('visualization', '1', {packages: [
 'bar']});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data

Re: [visualization-api] Re: How to setup Y Axis steps for bar chart

2015-04-01 Thread Shahid Majeed
Thanks. Chart come up. Now i am on the same point how to setup the ticks :(
Script:
script type='text/javascript'  
google.load('visualization', '1', {packages: [
'corechart','bar']});
google.setOnLoadCallback(drawSaleChart);
 
function drawSaleChart() { 
var data = google.visualization.arrayToDataTable([  
['Projektledare','Sale','Avg'],['Anstenius',91530,18306
],['Björnaes',140445,10031.79],['Hammarstrom ',64380,8047.5],['Fuglsang',
512575,17675]]); var options = {title: 'Projektledning: Sales'};var chart = 
new google.visualization.ColumnChart(document.getElementById('div_chart'));
chart.draw(data, options);} /script
div id=div_chart style=height: 325px; text-
align: left;/div



On Wednesday, April 1, 2015 at 10:58:35 PM UTC+2, Sergey wrote:

 You need to call the right class: google.visualization.ColumnChart.

 On Wed, Apr 1, 2015 at 4:56 PM Shahid Majeed shahid...@gmail.com 
 javascript: wrote:

 Correct but still chart does not come up
 script type='text/javascript'  
 google.load('visualization', '1', {packages: [
 'corechart','bar']});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data = google.visualization.arrayToDataTable([  
 ['Projektledare','Sale','Avg'],['Ahlenius',0,0],[
 'emma',54200,27100],['Anstenius',145105,16122.78],['ida',0,0],['Björnaes'
 ,396190,13206.33],['Hammarstrom ',207230,12951.88],['Fuglsang',851005,
 20756.22],['Strand',817710,32708.4],['Wiberg',0,0],['Wilsletf',779635,
 41033.42],['Bergseije',475,475],['Samuelsson',17535,17535],['Dijkstra',0,
 0],['Ranheimer',287151,143575.5]]); var options = {title: 'Projektledning: 
 Sales'};var chart = new google.charts.ColumnChart(document.getElementById
 ('div_chart'));chart.draw(data, options);} /script
 div id=div_chart style=height: 325px; 
 text-align: left;/div


 https://lh3.googleusercontent.com/-x8BpdZ0SrA4/VRxdIKirESI/AtU/ZUXRmENY3hg/s1600/chart2.JPG


 https://lh3.googleusercontent.com/-x8BpdZ0SrA4/VRxdIKirESI/AtU/ZUXRmENY3hg/s1600/chart2.JPG



 On Wednesday, April 1, 2015 at 10:52:25 PM UTC+2, Sergey wrote:

 The title is specified differently for Classic Charts. It needs to be a 
 top-level option. That means that your options structure should be as 
 follows:
 var options = {title: 'Projektledning: Sales'};

 On Wed, Apr 1, 2015 at 4:49 PM Shahid Majeed shahid...@gmail.com 
 wrote:

 I tried to update my script according to the example but now its does 
 shows on my page.
 Here is my updated script
 script type='text/javascript'  
 google.load('visualization', '1', {packages: [
 'corechart','bar']});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data = google.visualization.arrayToDataTable([ 
  
 ['Projektledare','Sale','Avg'],['Ahlenius',0,0],[
 'emma',54200,27100],['Anstenius',145105,16122.78],['ida',0,0],['
 Björnaes',396190,13206.33],['Hammarstrom ',207230,12951.88],['Fuglsang'
 ,851005,20756.22],['Strand',817710,32708.4],['Wiberg',0,0],['Wilsletf',
 779635,41033.42],['Bergseije',475,475],['Samuelsson',17535,17535],['
 Dijkstra',0,0],['Ranheimer',287151,143575.5]]); var options = {chart: { 
 title: 'Projektledning: Sales'}};var chart = new google.charts.
 ColumnChart(document.getElementById('div_chart'));chart.draw(data, 
 options);} /script
 div id=div_chart style=height: 325px; 
 text-align: left;/div



 On Wednesday, April 1, 2015 at 10:43:08 PM UTC+2, Sergey wrote:

 Yes. Here is an example: https://jsfiddle.net/fggkgoau/

 On Wed, Apr 1, 2015 at 4:41 PM Shahid Majeed shahid...@gmail.com 
 wrote:

 Is it possible i use two series in regular column chart. On the API 
 page i only see one series example. Do you refer me an example related 
 to 
 my data.
 Thanks


 On Wednesday, April 1, 2015 at 10:33:39 PM UTC+2, Sergey wrote:

 I think that if your two data measures have the same scale, showing 
 them on separate axes is misleading. If the average column looks tiny, 
 then 
 that's the nature of the data. If I misunderstood the nature of your 
 data, 
 and they are on different scales, then putting them on separate axes 
 was 
 the right decision, and I apologize.

 There is currently no way to control the ticks with that sort of 
 granularity. The regular ColumnChart supports custom ticks, so you 
 could 
 use that.

 On Wed, Apr 1, 2015 at 4:30 PM Shahid Majeed shahid...@gmail.com 
 wrote:


 https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG

[visualization-api] Re: How to setup Y Axis steps for bar chart

2015-04-01 Thread Shahid Majeed


https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG
If i removed the series and y axis option then my chart look like this. Now 
problem is I have large sale value as compared to average. Average column 
look very tiny. Is it possible i can set the interval min 0 and then 
gridlines increase by specific interval such as 100K 

https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG


On Wednesday, April 1, 2015 at 10:24:40 PM UTC+2, Shahid Majeed wrote:

 Hi,
 I am new to google chart api. I am trying to create a bar chart with Sale 
 and Avg sale series. I Succeed to create chart but i tried allot to set the 
 Y-axis steps to make the chart sensible.

 If you check my chart left Y-axis (Sale) range from 0 to 800K and right 
 Y-axis(Avg) range from 0 to150K.
 Most of the columns shows the average column higher than sale because its 
 draw according to value. 

 Any suggestion please how to make this sensible.

 Thanks in advance

 Here is my script
 script type='text/javascript'  
 google.load('visualization', '1', {packages: ['bar'
 ]});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data = google.visualization.arrayToDataTable([  
 ['Projektledare','Sale','Avg'],['Anstenius',53575,
 13393.75],['Björnaes',147395,13399.55],['Hammarstrom ',80810,26936.67],[
 'Fuglsang',112080,56040],['Wilsletf',779635,41033.42],['Ranheimer',287151,
 143575.5]]); var options = {chart: { title: 'Projektledning: Sales'},
 series: {
 0: { axis: 'Sale' }, 
 1: { axis: 'Avg' }
   },axes: {
 y: {
   Sale: {label: 'Sale'},
   Avg: {side: 'right', label: 'Avg 
 Sale'}
 }
   }};var chart = new google.charts.Bar
 (document.getElementById('div_chart'));chart.draw(data, options);} 
 /script
 div id=div_chart style=height: 325px; text
 -align: left;/div



 Here how the chart look like

 http://i57.tinypic.com/16gfjhs.jpg



-- 
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: How to setup Y Axis steps for bar chart

2015-04-01 Thread Shahid Majeed
I tried to update my script according to the example but now its does shows 
on my page.
Here is my updated script
script type='text/javascript'  
google.load('visualization', '1', {packages: [
'corechart','bar']});
google.setOnLoadCallback(drawSaleChart);
 
function drawSaleChart() { 
var data = google.visualization.arrayToDataTable([  
['Projektledare','Sale','Avg'],['Ahlenius',0,0],['emma',
54200,27100],['Anstenius',145105,16122.78],['ida',0,0],['Björnaes',396190,
13206.33],['Hammarstrom ',207230,12951.88],['Fuglsang',851005,20756.22],[
'Strand',817710,32708.4],['Wiberg',0,0],['Wilsletf',779635,41033.42],[
'Bergseije',475,475],['Samuelsson',17535,17535],['Dijkstra',0,0],[
'Ranheimer',287151,143575.5]]); var options = {chart: { title: 'Projektledning: 
Sales'}};var chart = new google.charts.ColumnChart(document.getElementById(
'div_chart'));chart.draw(data, options);} /script
div id=div_chart style=height: 325px; text-
align: left;/div



On Wednesday, April 1, 2015 at 10:43:08 PM UTC+2, Sergey wrote:

 Yes. Here is an example: https://jsfiddle.net/fggkgoau/

 On Wed, Apr 1, 2015 at 4:41 PM Shahid Majeed shahid...@gmail.com 
 javascript: wrote:

 Is it possible i use two series in regular column chart. On the API page 
 i only see one series example. Do you refer me an example related to my 
 data.
 Thanks


 On Wednesday, April 1, 2015 at 10:33:39 PM UTC+2, Sergey wrote:

 I think that if your two data measures have the same scale, showing them 
 on separate axes is misleading. If the average column looks tiny, then 
 that's the nature of the data. If I misunderstood the nature of your data, 
 and they are on different scales, then putting them on separate axes was 
 the right decision, and I apologize.

 There is currently no way to control the ticks with that sort of 
 granularity. The regular ColumnChart supports custom ticks, so you could 
 use that.

 On Wed, Apr 1, 2015 at 4:30 PM Shahid Majeed shahid...@gmail.com 
 wrote:


 https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG
 If i removed the series and y axis option then my chart look like this. 
 Now problem is I have large sale value as compared to average. Average 
 column look very tiny. Is it possible i can set the interval min 0 and 
 then 
 gridlines increase by specific interval such as 100K 


 https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG


 On Wednesday, April 1, 2015 at 10:24:40 PM UTC+2, Shahid Majeed wrote:

 Hi,
 I am new to google chart api. I am trying to create a bar chart with 
 Sale and Avg sale series. I Succeed to create chart but i tried allot to 
 set the Y-axis steps to make the chart sensible.

 If you check my chart left Y-axis (Sale) range from 0 to 800K and 
 right Y-axis(Avg) range from 0 to150K.
 Most of the columns shows the average column higher than sale because 
 its draw according to value. 

 Any suggestion please how to make this sensible.

 Thanks in advance

 Here is my script
 script type='text/javascript'  
 google.load('visualization', '1', {packages: [
 'bar']});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data = google.visualization.arrayToDataTable([ 
  
 ['Projektledare','Sale','Avg'],['Anstenius',53575,
 13393.75],['Björnaes',147395,13399.55],['Hammarstrom ',80810,26936.67
 ],['Fuglsang',112080,56040],['Wilsletf',779635,41033.42],['Ranheimer',
 287151,143575.5]]); var options = {chart: { title: 'Projektledning: 
 Sales'},series: {
 0: { axis: 'Sale' }, 
 1: { axis: 'Avg' }
   },axes: {
 y: {
   Sale: {label: 'Sale'},
   Avg: {side: 'right', label: 
 'Avg 
 Sale'}
 }
   }};var chart = new google.charts
 .Bar(document.getElementById('div_chart'));chart.draw(data, options);} 
 /script
 div id=div_chart style=height: 325px; 
 text-align: left;/div



 Here how the chart look like

 http://i57.tinypic.com/16gfjhs.jpg

  -- 
 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-visua...@googlegroups.com.


 Visit this group at http://groups.google.com/
 group

[visualization-api] How to setup Y Axis steps for bar chart

2015-04-01 Thread Shahid Majeed
Hi,
I am new to google chart api. I am trying to create a bar chart with Sale 
and Avg sale series. I Succeed to create chart but i tried allot to set the 
Y-axis steps to make the chart sensible.

If you check my chart left Y-axis (Sale) range from 0 to 800K and right 
Y-axis(Avg) range from 0 to150K.
Most of the columns shows the average column higher than sale because its 
draw according to value. 

Any suggestion please how to make this sensible.

Thanks in advance

Here is my script
script type='text/javascript'  
google.load('visualization', '1', {packages: ['bar']});
google.setOnLoadCallback(drawSaleChart);
 
function drawSaleChart() { 
var data = google.visualization.arrayToDataTable([  
['Projektledare','Sale','Avg'],['Anstenius',53575,
13393.75],['Björnaes',147395,13399.55],['Hammarstrom ',80810,26936.67],[
'Fuglsang',112080,56040],['Wilsletf',779635,41033.42],['Ranheimer',287151,
143575.5]]); var options = {chart: { title: 'Projektledning: Sales'},series: 
{
0: { axis: 'Sale' }, 
1: { axis: 'Avg' }
  },axes: {
y: {
  Sale: {label: 'Sale'},
  Avg: {side: 'right', label: 'Avg 
Sale'}
}
  }};var chart = new google.charts.Bar(
document.getElementById('div_chart'));chart.draw(data, options);} /script
div id=div_chart style=height: 325px; text-
align: left;/div



Here how the chart look like

http://i57.tinypic.com/16gfjhs.jpg

-- 
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: How to setup Y Axis steps for bar chart

2015-04-01 Thread Shahid Majeed
Is it possible i use two series in regular column chart. On the API page i 
only see one series example. Do you refer me an example related to my data.
Thanks

On Wednesday, April 1, 2015 at 10:33:39 PM UTC+2, Sergey wrote:

 I think that if your two data measures have the same scale, showing them 
 on separate axes is misleading. If the average column looks tiny, then 
 that's the nature of the data. If I misunderstood the nature of your data, 
 and they are on different scales, then putting them on separate axes was 
 the right decision, and I apologize.

 There is currently no way to control the ticks with that sort of 
 granularity. The regular ColumnChart supports custom ticks, so you could 
 use that.

 On Wed, Apr 1, 2015 at 4:30 PM Shahid Majeed shahid...@gmail.com 
 javascript: wrote:


 https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG
 If i removed the series and y axis option then my chart look like this. 
 Now problem is I have large sale value as compared to average. Average 
 column look very tiny. Is it possible i can set the interval min 0 and then 
 gridlines increase by specific interval such as 100K 


 https://lh3.googleusercontent.com/-5O5DoHpFWOc/VRxVdfFg_NI/AtE/PrYYO3VkFFg/s1600/chart1.JPG


 On Wednesday, April 1, 2015 at 10:24:40 PM UTC+2, Shahid Majeed wrote:

 Hi,
 I am new to google chart api. I am trying to create a bar chart with 
 Sale and Avg sale series. I Succeed to create chart but i tried allot to 
 set the Y-axis steps to make the chart sensible.

 If you check my chart left Y-axis (Sale) range from 0 to 800K and right 
 Y-axis(Avg) range from 0 to150K.
 Most of the columns shows the average column higher than sale because 
 its draw according to value. 

 Any suggestion please how to make this sensible.

 Thanks in advance

 Here is my script
 script type='text/javascript'  
 google.load('visualization', '1', {packages: ['bar'
 ]});
 google.setOnLoadCallback(drawSaleChart);
  
 function drawSaleChart() { 
 var data = google.visualization.arrayToDataTable([  
 ['Projektledare','Sale','Avg'],['Anstenius',53575,
 13393.75],['Björnaes',147395,13399.55],['Hammarstrom ',80810,26936.67],[
 'Fuglsang',112080,56040],['Wilsletf',779635,41033.42],['Ranheimer',2871
 51,143575.5]]); var options = {chart: { title: 'Projektledning: Sales'},
 series: {
 0: { axis: 'Sale' }, 
 1: { axis: 'Avg' }
   },axes: {
 y: {
   Sale: {label: 'Sale'},
   Avg: {side: 'right', label: 'Avg 
 Sale'}
 }
   }};var chart = new google.charts.
 Bar(document.getElementById('div_chart'));chart.draw(data, options);} 
 /script
 div id=div_chart style=height: 325px; 
 text-align: left;/div



 Here how the chart look like

 http://i57.tinypic.com/16gfjhs.jpg

  -- 
 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 
 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.