1

This might be a strange request but is it possible to have a single line chart "display" as area, as in have the shaded part below the line, however not rescale the y axis from 0?

So for example this chart: http://jsfiddle.net/29shP/1/

Is chart type line...

enter image description here

But if I change type: 'area'

Then it displays like this: enter image description here

Is it possible for the series to stay as it is in the first image, but with the shaded colour below?

Thanks

hcharge
  • 1,216
  • 2
  • 24
  • 43

3 Answers3

4

I advice familiar with this https://github.com/highslide-software/highcharts.com/issues/1401 thread which describe this issue.

Here is the answer given in the thread:

The difference is that the threshold is set to 0 by default for areas. You'll find the same for columns. See http://api.highcharts.com/highcharts#plotOptions.area.threshold. You can disable that behaviour by setting the threshold to null.

nathancahill
  • 10,452
  • 9
  • 51
  • 91
Sebastian Bochan
  • 37,348
  • 3
  • 49
  • 75
0

yes you can do that

highcharts allow you to keep separate series options in the navigator there you can change

navigator: {
            series: {
                data: ADBE,
            type: 'line'
            }
        },

here is a jsfiddle for your reference http://jsfiddle.net/GhA5d/

updated your fiddle at http://jsfiddle.net/29shP/2/

Hope this will be useful for you

Strikers
  • 4,698
  • 2
  • 28
  • 58
  • but that hasn't changed the appearance of the chart? what i'm looking for is the chart to have the shaded area below the line, but not scale from 0 – hcharge May 03 '13 at 09:17
  • sorry i think you misinterpreted my question, i want the actual chart to be shaded, not the navigator, i've updated the pictures in my question – hcharge May 03 '13 at 09:20
  • so you want main series as line and navigator series as area or vice versa – Strikers May 03 '13 at 11:16
  • ok i got your question. http://jsfiddle.net/29shP/3/ could do the work for you. set min property for yAxis to some value which will not effect the chart – Strikers May 03 '13 at 11:23
  • hmm this doesn't really seem like the best way to do it, as these charts could have various different values. so there's no built in way to style it as an area chart then? – hcharge May 03 '13 at 12:40
0

Use "min"

yAxis: {
            startOnTick: false,
            endOnTick: false,
            min: 0
        },

Example: http://jsfiddle.net/29shP/4/

If you want multiple yAxis min, you can do this:

yAxis: [{
            min: 0
            },
        {
            min: 0
}],

Check this: Highcharts - Multiple Y Axis Stacked Charts (include jsFiddle in comments)

Community
  • 1
  • 1
Lorenzo
  • 797
  • 6
  • 27
  • so would I have to dynamically set the min to the lowest point in the series? how would this work with panning? – hcharge May 03 '13 at 13:55
  • about first question I think yes, and with the panning I'm not sure, make a test an share here if you want and we can take a look – Lorenzo May 03 '13 at 14:11