org.pentaho.platform.plugin.action.chartbeans
Class ChartLinkGenerator

java.lang.Object
  extended by org.pentaho.platform.plugin.action.chartbeans.ChartLinkGenerator
All Implemented Interfaces:
org.pentaho.chart.IChartLinkGenerator

public class ChartLinkGenerator
extends Object
implements org.pentaho.chart.IChartLinkGenerator

Provides a collection of callback methods used by the chart beans API which give the api user the ability link data points in the chart URLs or javascript. When the user clicks on a bar, point, or pie slice the user will execute the link or javascript provided by implementors of this interface

Author:
arodriguez

Constructor Summary
ChartLinkGenerator(String urlTemplate)
          Constructs a chart link generator.
 
Method Summary
 String generateLink(String seriesName, Number domainValue, Number rangeValue)
           
 String generateLink(String seriesName, String domainName, Number rangeValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartLinkGenerator

public ChartLinkGenerator(String urlTemplate)
Constructs a chart link generator. There are three placeholders that can be used within the url template that will be replaced with the value at a given data point on the chart. The placeholders are "{series}", "{domain}", and "{range}". For example if the template is http://www.weather.com?postalCode={domain} then at run time the string "{domain}" will be replaced the the domain value of each data point. Prefix all javascript function calls with "javascript:" (Ex. javascript:alert('hello world')).

Method Detail

generateLink

public String generateLink(String seriesName,
                           String domainName,
                           Number rangeValue)
Specified by:
generateLink in interface org.pentaho.chart.IChartLinkGenerator

generateLink

public String generateLink(String seriesName,
                           Number domainValue,
                           Number rangeValue)
Specified by:
generateLink in interface org.pentaho.chart.IChartLinkGenerator