zoite
zoite

Reputation: 189

Change marker line color in highstocks

I'm trying to change the line color that shows up when you hover over a point in highstocks but I haven't been able to find any such setting in their documentation.

Here's what I'm trying to change the color of

example

$(function() {
    $('#container').highcharts('StockChart', {

        tooltip: {
            backgroundColor: {
                linearGradient: {
                    x1: 0,
                    y1: 0,
                    x2: 0,
                    y2: 1
                },
                stops: [
                    [0, 'white'],
                    [1, '#EEE']
                ]
            },
            borderColor: 'gray',
            borderWidth: 1
        },

        rangeSelector: {
            selected: 1
        },

        series: [{
            name: 'USD to EUR',
            data: usdeur
        }]
    });
});

Here's my jsfiddle

Upvotes: 0

Views: 285

Answers (2)

zoite
zoite

Reputation: 189

I've found the property I needed. I just needed to add the following to the tooltip

crosshairs: {
    color: '#ff0000'
}

http://jsfiddle.net/BWwbK/2/

Upvotes: 0

Strikers
Strikers

Reputation: 4776

it is called as a crosshair.

this can be set from tollrip

crosshairs: {
    dashStyle: 'dash',
    color: 'red'
 }

change the color and other properties of crosshair in this section

updated your fiddle at http://jsfiddle.net/BWwbK/1/

hope this will be useful for you

Upvotes: 1

Related Questions