Class ChartLinkGenerator

java.lang.Object
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 Details

    • 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 Details

    • 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