New to Kendo UI for jQuery? Start a free 30-day trial

Configures the major grid lines. These are the lines that are an extension of the major ticks through the body of the chart.

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2012/01/01"), close: 300, volume: 40000 },
            { date: new Date("2012/01/02"), close: 310, volume: 50000 },
            { date: new Date("2012/01/03"), close: 320, volume: 45000 }
        ]
    },
    dateField: "date",
    categoryAxis: {
        majorGridLines: {
            visible: true,
            color: "#cccccc",
            width: 1
        }
    },
    series: [{
        type: "candlestick",
        field: "close"
    }]
});
</script>

The color of the lines. Any valid CSS color string will work here, including hex and rgb.

Default: "black"

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2012/01/01"), close: 300, volume: 40000 },
            { date: new Date("2012/01/02"), close: 310, volume: 50000 },
            { date: new Date("2012/01/03"), close: 320, volume: 45000 }
        ]
    },
    dateField: "date",
    categoryAxis: {
        majorGridLines: {
            color: "#ff6800"
        }
    },
    series: [{
        type: "candlestick",
        field: "close"
    }]
});
</script>

The dash type of the grid lines.

"solid"

Specifies a solid line.

"dot"

Specifies a line consisting of dots.

"dash"

Specifies a line consisting of dashes.

"longDash"

Specifies a line consisting of a repeating pattern of long-dash.

"dashDot"

Specifies a line consisting of a repeating pattern of dash-dot.

"longDashDot"

Specifies a line consisting of a repeating pattern of long-dash-dot.

"longDashDotDot"

Specifies a line consisting of a repeating pattern of long-dash-dot-dot.

Default: "solid"

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2012/01/01"), close: 300, volume: 40000 },
            { date: new Date("2012/01/02"), close: 310, volume: 50000 },
            { date: new Date("2012/01/03"), close: 320, volume: 45000 }
        ]
    },
    dateField: "date",
    categoryAxis: {
        majorGridLines: {
            dashType: "dash"
        }
    },
    series: [{
        type: "candlestick",
        field: "close"
    }]
});
</script>

The skip of the category axis major grid lines.

Default: 0

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2012/01/01"), close: 300, volume: 40000 },
            { date: new Date("2012/01/02"), close: 310, volume: 50000 },
            { date: new Date("2012/01/03"), close: 320, volume: 45000 },
            { date: new Date("2012/01/04"), close: 330, volume: 55000 },
            { date: new Date("2012/01/05"), close: 340, volume: 60000 }
        ]
    },
    dateField: "date",
    categoryAxis: {
        majorGridLines: {
            skip: 1
        }
    },
    series: [{
        type: "candlestick",
        field: "close"
    }]
});
</script>

The step of the category axis major grid lines.

Default: 1

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2012/01/01"), close: 300, volume: 40000 },
            { date: new Date("2012/01/02"), close: 310, volume: 50000 },
            { date: new Date("2012/01/03"), close: 320, volume: 45000 },
            { date: new Date("2012/01/04"), close: 330, volume: 55000 },
            { date: new Date("2012/01/05"), close: 340, volume: 60000 }
        ]
    },
    dateField: "date",
    categoryAxis: {
        majorGridLines: {
            step: 2
        }
    },
    series: [{
        type: "candlestick",
        field: "close"
    }]
});
</script>

The visibility of the lines.

Default: false

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2012/01/01"), close: 300, volume: 40000 },
            { date: new Date("2012/01/02"), close: 310, volume: 50000 },
            { date: new Date("2012/01/03"), close: 320, volume: 45000 }
        ]
    },
    dateField: "date",
    categoryAxis: {
        majorGridLines: {
            visible: true
        }
    },
    series: [{
        type: "candlestick",
        field: "close"
    }]
});
</script>

The width of the lines.

Default: 1

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2012/01/01"), close: 300, volume: 40000 },
            { date: new Date("2012/01/02"), close: 310, volume: 50000 },
            { date: new Date("2012/01/03"), close: 320, volume: 45000 }
        ]
    },
    dateField: "date",
    categoryAxis: {
        majorGridLines: {
            width: 2
        }
    },
    series: [{
        type: "candlestick",
        field: "close"
    }]
});
</script>