Search code examples
chartsdata-visualizationfusionchartstimeserieschart

Fusioncharts — Highlight/shade a date range in a time series chart


I have a graph created following this example. I want to highlight a particular region on the X-axis, say from May to Jul. Is this possible in Fusioncharts? I have already looked into reference zones (no such thing for X-axis) and vertical lines (not applicable to time series-type graphs).


Solution

  • You can check timemarker feature of FusionTime where you define the events that occurred for a certain time frame on the x-axis, here is a snippet how to define it

     xaxis: {
          plot: "Time",
          timemarker: [
            {
              start: "Jul-1981",
              end: "Nov-1982",
              label:
                "Economic downturn was triggered by {br} tight monetary policy in an effort to {br} fight mounting inflation.",
              timeformat: "%b-%Y"
            }]
        }
    

    To know more about it check this demo - https://www.fusioncharts.com/fusiontime/examples/date-range-event-overlay?framework=javascript