You need to sign in to do that
Don't have an account?
Alo Sen
series: [{ name: 'Facilities that Started in RRT',
data: [ <apex:repeat value="{!ACRecord}" var="sc">
{!sc.Facilities_Started_in_RRT__c},
</apex:repeat>] },
In the above code I want to say - show the data only when the value of the variable is greater than zero. Is there a way to do this? this code is a part of Highchart using the Series for data.
How to say 'if the value is greater than 0' in apex repeat in a highchart series
series: [{ name: 'Facilities that Started in RRT',
data: [ <apex:repeat value="{!ACRecord}" var="sc">
{!sc.Facilities_Started_in_RRT__c},
</apex:repeat>] },
In the above code I want to say - show the data only when the value of the variable is greater than zero. Is there a way to do this? this code is a part of Highchart using the Series for data.
VF pages can have logic, but it's purpose is mainly to display data.
So instead of using {!ACRecord}, it should be using the filtered one like: {!ACRecordFIltered}
Thx.
<apex:repeat value="{!Details}" var ="det" rendered="{!Details.size>0}">
</apex:repeat>
William, the ACRecord is a list that holds over 100 fields. It is a query of all the fields in an object. Sets of fields are used in different vf dashboard pages. I was wondering how best to handle this in the controller. Some fields do need to have a default value of zero, while others should not show if the value is zero. Having separate queries for each vf page maybe?
{if(this.y != 0) {return ''+ this.y;}} on the plotoptions formatter function.
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
formatter: function() {if(this.y != 0) {return ''+ this.y;}}
}
}
},
There is an answer from the following site.
http://stackoverflow.com/questions/15834687/how-to-hide-zero-values-in-column-chart
Thanks to Eduardo.