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

ValueAxis.title

configuration

The title of the value axis.

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            color: "blue"
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

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

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            background: "lightgray"
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

The border of the title.

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            border: {
                color: "blue",
                width: 2
            }
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

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

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            color: "green"
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

The font style of the title.

Default: "16px Arial,Helvetica,sans-serif"

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            font: "bold 18px Arial"
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

valueAxis.title.margin

Number | Object

The margin of the title.

Default: 5

pseudo
    // sets the top, right, bottom and left margin to 3px.
    margin: 3

    // sets the top and left margin to 1px
    // margin right and bottom are with 0px (by default)
    margin: { top: 1, left: 1 }

The padding of the title.

Default: 0

pseudo
    // sets the top, right, bottom and left padding to 3px.
    padding: 3

    // sets the top and left padding to 1px
    // padding right and bottom are with 0px (by default)
    padding: { top: 1, left: 1 }

The position of the title.

"top"

The axis title is positioned on the top (applicable to vertical axis).

"bottom"

The axis title is positioned on the bottom (applicable to vertical axis).

"left"

The axis title is positioned on the left (applicable to horizontal axis).

"right"

"The axis title is positioned on the right (applicable to horizontal axis).

"center"

"The axis title is positioned in the center.

Default: "center"

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            position: "top"
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

The rotation angle of the title.

Default: 0

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            rotation: 90
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

The text of the title.

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Stock Price ($)"
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>

The visibility of the title.

Default: true

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: "2012/01/01", open: 10, high: 15, low: 8, close: 12, volume: 1000 },
            { date: "2012/01/02", open: 12, high: 18, low: 10, close: 15, volume: 1200 }
        ]
    },
    dateField: "date",
    valueAxis: {
        title: {
            text: "Price",
            visible: false
        }
    },
    series: [{
        type: "candlestick",
        openField: "open",
        highField: "high", 
        lowField: "low",
        closeField: "close"
    }]
});
</script>