You need to sign in to do that
Don't have an account?
Bryn Jones
Coding problem
I am having issues with my coding. I am creating my on dashboard using google charts. I am trying to refence the sum of a feild i have in Account but i keep getting Error: Unknown property 'account' referenced in testing
This is my code. Could you alo provide how to limit it the value to a time frame.
<apex:page >
<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['gauge']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Label', 'Value'],
['VE Sales', <apex:outputField value = "{!account.of_Lost_Opps__c}"/>],
['CPU', 55],
['Network', 68]
]);
var options = {
width: 1050, height: 700,
redFrom: 90, redTo: 100,
yellowFrom:75, yellowTo: 90,
greenFrom:90, greenTo:150,
minorTicks: 5, max: 150,
};
var chart = new google.visualization.Gauge(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id='chart_div'></div>
</body>
</html>
</apex:page>
This is my code. Could you alo provide how to limit it the value to a time frame.
<apex:page >
<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['gauge']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Label', 'Value'],
['VE Sales', <apex:outputField value = "{!account.of_Lost_Opps__c}"/>],
['CPU', 55],
['Network', 68]
]);
var options = {
width: 1050, height: 700,
redFrom: 90, redTo: 100,
yellowFrom:75, yellowTo: 90,
greenFrom:90, greenTo:150,
minorTicks: 5, max: 150,
};
var chart = new google.visualization.Gauge(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id='chart_div'></div>
</body>
</html>
</apex:page>
Call standard controller Account in your page. Like:
<apex:page standardController="Account">