1

Attempting to create a second level of data in the xrange charttype of highcharts does not behave as expected

see jsfiddle https://jsfiddle.net/bo8eL42v/10/ and highcharts documentation https://api.highcharts.com/highcharts/series.xrange.data.drilldown

BACKGROUND - IDEAL BEHAVIOR: upon clicking on a series the chart is redrawn w/ that same series broken down into time buckets (Day || Week) as the categories -- this would allow for a Day over Day / Week over Week comparison rather than a Person by Person comparison

SubPar Alternate solution is to use the series.events.click to trigger a func that would overwrite the chart entirely w/ the DayOverDay behavior

Implemented a basic jsfiddle to test that conceptually drilldown should work as described

...
            x: Date.UTC(2014, 11, 10),
            x2: Date.UTC(2014, 11, 23),
            y: 2,
            drilldown: 'a'
        }],
        ...
    }],
    drilldown: {
        series: [{
        id: 'a',
        data: [{
            x: Date.UTC(2014, 10, 21),
            x2: Date.UTC(2014, 11, 1),
            y: 0,
            partialFill: 0.25
        },{
            x: Date.UTC(2014, 11, 1),
            x2: Date.UTC(2014, 11, 2),
            y: 0,
            partialFill: 0.25
        }]
      }]
    }

Expected: clicking on any of the datapoints where drilldown: 'a' should redraw the chart w/ only the points defined in the drilldown.series.'a' where 'a' is the id

Actual: nothing happens, no errors thrown

Poncher
  • 53
  • 6

1 Answers1

1

You need to include the drilldown module for the drilldown to function:

<script src="https://code.highcharts.com/modules/drilldown.js"></script>

See this JSFiddle demonstration.

Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99
  • well that's embarrassing - thanks that got me to the point i could continue – Poncher May 24 '19 at 16:39
  • update: i wasn't able to accomplish what i wanted w/ drilldowns since i can't also update the categories to drilldown categories (Agent By Agent Comparison -> Single Agent By Day/Week Comparison) - i ended up using series click event to trigger another data call, whose response handler clobbers the chart - then a back button event triggers the original call/handler to draw the main graph - Not ideal but serviceable – Poncher May 28 '19 at 13:58