Class ReportTimelineXMLTransform

  • All Implemented Interfaces:
    Transform

    public class ReportTimelineXMLTransform
    extends AbstractReportXMLTransform
    This transform generates the report xml necessary for the timeline AJAX visualization sample rendered by ReportTimelineVisualizationTransform
    The following is a sample of the XML generated:

     <data>
       <event start="1/7/2002" title="event title 1" end="1/15/2002">event description 1</event>
       <event start="1/18/2002" title="event title 2" end="1/23/2002">event description 2</event>
     </data>
     
    This transforms assumes the following regarding the report structure:
    • The report contains at least 2 attributes on the rows axis
    • The first attribute represents the event. This attribute has the following forms:
      • EventTitle
      • EventDescription - When clicked this opens in the popup window
      • EventImage - Image source of the image displayed in the popup.
      • EventColor - Color of the horizontal bar
      • EventIcon - Image source for the icon displayed on the timeline.
      • EventTextPostion - Whether to start the text to the right of the bar or on top of the bar
    • The second attribute represents the event's start date
    • The third attribute represents the event's end date (optional)
    More information about the timeline code can be obtained from http://simile.mit.edu/timeline/
    Since:
    MicroStrategy Web 8.1.1
    • Field Detail

      • _imagesLocation

        public FormalParameter _imagesLocation
        The location of the images used for the popup Default value: "images/"
    • Constructor Detail

      • ReportTimelineXMLTransform

        public ReportTimelineXMLTransform()
    • Method Detail

      • addDateFormat

        protected void addDateFormat​(Tag dataTag)
        Adds date-time-format="iso8601" to "data" XML tag
        Note: overwrite this and getFormatedDate(String) to change date format.
        Parameters:
        dataTag -
      • getFormatedDate

        protected java.lang.String getFormatedDate​(java.lang.String dateStr)
        Returns a date formatted as ISO 8601 as required per the timeline sample.
        Note: overwrite this and addDateFormat(Tag) to change date format.
        Parameters:
        dateStr - the date to format
        Returns:
        The date formatted as ISO 8601
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Transform
        Returns a textual description of the transform.
        Returns:
        The textual description of the transform.