You need to sign in to do that
Don't have an account?
mcrispin@safeschools.com
I'm trying to create a visualforce page to be used as a component in Dashboard (A).
I'm trying to create a visualforce page to be used as a component in Dashboard (A). This page should return a specifc report or a different Dashboard (B). I'm using the following for a simple report and it's returning the dreaded white screen. Any ideas? To clarify, I need the visualforce page to return the report data (or dashboard) rather than a report chart. Any idea? How would I do this to display another Dashboard?
<apex:page >
<apex:iframe src="/00O40000004C7OZ"/>
</apex:page>
<apex:page >
<apex:iframe src="/00O40000004C7OZ"/>
</apex:page>
mcrispin@safeschools.com
You can use this code
<apex:chart> : Representing data in a graphical form .
Height : The height of the chart rectangle, in pixels when given as an integer,
Width : The width of the chart rectangle, in pixels when given as an integer,
Data : Specifies the data binding for the chart. This can be a controller method reference in an expression,
<apex:axis> : Defines an axis for a chart. Use this to set the units, scale, labeling, and other visual options for the axis.
Type :
"Category" for non-numeric information,
"Numeric" for quantitative values.3. "Gauge" is used only with, and required by, < apex:gaugeSeries >.
4. "Radial" is used only with, and required by, < apex:radarSeries >.
Position : The edge of the chart to which to bind the axis. Valid options are:
Left
Right
Top
Bottom
Guage
RadialFields : The field(s) in each record of the chart data from which to retrieve axis label values.
Title : The label for the axis.
<apex:lineseries> :
Axis : Which axis this chart series should bind to. Must be one of the four edges of the chart:
Left , right , top , bottom .
Fill : A Boolean value that specifies whether the area under the line should be filled or not.
Fillcolor : A string that specifies the color to use to fill the area under the line,
Xfield :
Yfield :
Smooth : An integer specifying the amount of smoothing for the line,
Markertype : circle, cross
Markersize :
Markerfill : marker color
Ex : ‑‑
public class ChartController {
public List<Data> getdata() {
return ChartController.ChartData();
}
public static List<Data> ChartData() {
List<Data> data = new List<Data>();
data.add(new Data('Jan', 30));
data.add(new Data('Feb', 44));
data.add(new Data('Mar', 25));
data.add(new Data('Apr', 74));
data.add(new Data('May', 65));
data.add(new Data('Jun', 33));
data.add(new Data('Jul', 92));
data.add(new Data('Aug', 87));
data.add(new Data('Sep', 34));
data.add(new Data('Oct', 78));
data.add(new Data('Nov', 80));
data.add(new Data('Dec', 17));
return data;
}
// Wrapper class
public class Data {
public String name { get; set; }
public Integer data1 { get; set; }
public Data(String name, Integer data1) {
this.name = name;
this.data1 = data1;
}
}
}
<apex:barseries> :
Orientation : The direction of the bars in the chart. Valid options are
Horizontal , vertical .
Axis : Which axis this chart series should bind to.
Left , right , top , bottom .
Xfield :
Yfield :
colorsProgressWithinSeries : Boolean
highlight : Boolean .
Ex :
<apex:pageBlockSectionitem >
<apex:chart name="AnnualRecurringRevenue" data="{!data}" width="400" height="400"
colorSet="#156F9E,#FF9123,#6BAE4A,#424242,#A4A4A4,red">
<apex:axis type="Numeric" position="left" grid="true" title="$(Millions)"
fields="data1"/>
<apex:axis type="Category" position="bottom" grid="false" title="Quarter"
fields="name"/>
<apex:barSeries orientation="vertical" axis="left" xField="name" yField="data1"
colorsProgressWithinSeries="true"/>
</apex:chart>
</apex:pageBlockSectionitem>
<apex:pieseries> :
Colorset :
Datafield : The field in each record provided in the chart data from which to retrieve the data value for each pie wedge
in the series.
Donut : An integer representing the radius of the hole to place in the center of the pie chart, as a percentage of the radius of
the pie.
Tips : A Boolean value that specifies whether to display a tooltip for each pie wedge when the mouse pointer passes over it.
Ex :
<apex:chart name="AnnualRecurringRevenue1" data="{!data}" width="400" height="400"
colorSet="#156F9E,#FF9123,#6BAE4A,#424242,#A4A4A4">
<apex:pieSeries dataField="data1" labelField="name" donut="50"/>
<apex:legend position="bottom"/>
</apex:chart>
<apex:guageSeries> :
Datafeield : Only the first record is used.
Ex :
<apex:page controller="ChartController">
<apex:chart height="250" width="450" animate="true" legend="true" data="{!data}">
<apex:axis type="Gauge" position="right" margin="-10"
minimum="0" maximum="100" steps="10" fields="name"/>
<apex:gaugeSeries dataField="data1" highlight="true" tips="true" donut="25"
colorSet="#F49D10, #ddd" labelField="name" >
<apex:chartLabel display="over"/>
</apex:gaugeSeries>
</apex:chart>
</apex:page>
<apex:radarSeries> :
Xfield :
Yfield :
markerType : circle , cross
strokeWidth : An integer specifying the width of the line for this series.
strokeColor :
Thank u.