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

YAxis

configuration

The y axis configuration options of the scatter chart. Supports all valueAxis options.

yAxis

Array
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]] }
  ],
  yAxis: {
    color: "red",
    min: -5,
    max: 5,
    labels: {
      background: "green",
      color: "white"
    }
  }
});
</script>

yAxis.axisCrossingValue

Object|Date|Array

Value at which the Y axis crosses this axis. (Only for object)

Value indices at which the Y axes cross the value axis. (Only for array)

Date at which the Y axis crosses this axis. (Only for date)

Set a value greater than or equal to the axis maximum value to denote the far end of the axis.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]] }
  ],
  yAxis: {
    axisCrossingValue: [1, 2]
  }
});
</script>

The background color of the axis.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]] }
  ],
  yAxis: {
    background: "#ff0000"
  }
});
</script>

The base time interval for the axis labels. The default baseUnit is determined automatically from the value range. Available options:

  • milliseconds
  • seconds
  • minutes
  • hours
  • days
  • weeks
  • months
  • years
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    {
      type: "scatter",
      data: [
        [2, new Date("01/01/2013")],
        [2, new Date("01/02/2013")],
        [2, new Date("01/03/2013")]
      ]
    }
  ],
  yAxis: {
    type: "date",
    baseUnit: "hours"
  }
});
</script>

The category names. Applicable for charts with X and Y category axes (heatmap).

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: 'heatmap',
    data: [
      [ 'a', 'v2', 1 ],
      [ 'a', 'v1', 0 ]
    ]
  }],
  xAxis: {
    categories: ['a', 'b', 'c']
  },
  yAxis: {
    categories: ['v1', 'v2']
  }
});
</script>

The color of the axis. Accepts a valid CSS color string, including hex and rgb.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]] }
  ],
  yAxis: {
    color: "red"
  }
});
</script>

The crosshair configuration options.

The crosshair is displayed when the yAxis.crosshair.visible option is set to true.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  yAxis: {
    crosshair: {
      color: "green",
      width: 2,
      visible: true
    }
  },
  series: [
    { type: "scatter", data: [[1, 2]] }
  ]
});
</script>

The axis labels configuration.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]] }
  ],
  yAxis: {
    labels: {
      background: "green",
      color: "white"
    }
  }
});
</script>

The configuration of the axis lines. Also affects the major and minor ticks, but not the grid lines.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    line: {
      color: "#aa00bb",
      width: 3
    }
  }
});
</script>

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

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    majorGridLines: {
      color: "#aa00bb",
      width: 3
    }
  }
});
</script>

The configuration of the scatter chart y axis major ticks.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    majorTicks: {
      size: 6,
      color: "green",
      width: 5
    }
  }
});
</script>

The interval between major divisions. If this is a date axis the value represents the number of xAxis.baseUnits between major divisions. If the yAxis.type is set to "log", the majorUnit value will be used for the base of the logarithm.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    majorUnit: 1
  }
});
</script>
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatterLine",
    data: [[1, new Date(2012, 0, 1)],[2, new Date(2012, 0, 10)]]
  }],
  yAxis: {
    baseUnit: "days",
    majorUnit: 5
  }
});
</script>
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatterLine",
    data: [[1, 5], [2, 8], [3, 1024]]
  }],
  yAxis: {
    type: "log",
    majorUnit: 2
  }
});
</script>

yAxis.max

Object

The maximum value of the axis.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    max: 5
  }
});
</script>

yAxis.min

Object

The minimum value of the axis.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    min: 1
  }
});
</script>

The configuration of the minor grid lines. These are the lines that are an extension of the minor ticks through the body of the chart.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    minorGridLines: {
      width: 3
    }
  }
});
</script>

The configuration of the y axis minor ticks.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  yAxis: [{
    minorTicks: {
      size: 6,
      color: "green",
      width: 5,
      visible: true
    }
  }],
  series: [
    { data: [1, 2, 3] }
  ]
});
</script>

The interval between minor divisions. It defaults to 1/5 of the yAxis.majorUnit. If the yAxis.type is set to "log", the minorUnit value represents the number of divisions between two major units and defaults to the major unit minus one.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  yAxis: {
    type: "log",
    minorUnit: 2,
    minorGridLines: {
      visible: true
    }
  },
  series: [{
      type: "scatter",
      data: [[1, 3],[2, 20]]
    }]
});
</script>

The unique axis name. Used to associate a series with a y axis using the series.yAxis option.

Default: "primary"

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1000, 2000]], yAxis: "first" },
    { type: "scatter", data: [[5, 6]], yAxis: "second" }
  ],
  yAxis: [
    { name: "first"},
    { name: "second"}
  ]
});
</script>

If set to true the chart will prevent the automatic axis range from snapping to 0. Setting it to false will force the automatic axis range to snap to 0.

Default: false

<div id="chart"></div>
<script>
    $("#chart").kendoChart({
      series: [{
        type: "scatter",
        data: [[1000, 1000],[2000, 2000]]
      }],
      xAxis: {
        narrowRange: true
      },
      xAxis: {
        narrowRange: true
      }
    });
</script>
<div id="chart"></div>
<script>
    $("#chart").kendoChart({
      series: [{
        type: "scatter",
        data: [[1000, 1000],[1100, 1100]]
      }],
      xAxis: {
        narrowRange: false
      },
      yAxis: {
        narrowRange: false
      }
    });
</script>

The y axis notes configuration.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
    series: [{
        data: [1, 2, 3]
    }],
    yAxis: {
        notes: {
            position: "left",
            data: [{
                value: 2,
                label: {
                    text: "Important value"
                }
            }]
        }
    }
});
</script>

The name of the pane that the axis should be rendered in. The axis will be rendered in the first (default) pane if not set.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]], xAxis: "first", yAxis: "first" },
    { type: "scatter", data: [[5, 6]], xAxis: "second", yAxis: "second" }
  ],
  panes: [
    { name: "topPane" },
    { name: "bottomPane" },
  ],
  xAxis: [
    { name: "first"},
    { name: "second", pane: "bottomPane" }
  ],
  yAxis: [
    { name: "first"},
    { name: "second", pane: "bottomPane" }
  ]
});
</script>

The plot bands of the y axis.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]]}
  ],
  yAxis: {
    plotBands: [
      { from: 1, to: 2, color: "red" }
    ]
  }
});
</script>

If set to true the value axis direction will be reversed. By default values increase from left to right and from bottom to top.

Default: false

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { type: "scatter", data: [[1, 2]]}
  ],
  yAxis: {
    reverse: true
  }
});
</script>

The title configuration of the scatter chart y axis.

The yAxis.title.text option must be set in order to display the title.

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  yAxis: {
    title: {
      text: "Years",
      background: "green",
      border: {
        width: 1,
      }
    }
  },
  series: [
    { type: "scatter", data: [[1, 2]] }
  ]
});
</script>

The axis type.

The supported values are:

  • "numeric" - numeric axis.
  • "date" - specialized axis for displaying chronological data.
  • "log" - logarithmic axis.

The chart will automatically switch to a date axis if the series X value

is of type Date. Set the xAsix.type when such behavior is undesired.

Default: "numeric"

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    {
      type: "scatter",
      data: [
        [2, new Date("01/01/2013")],
        [2, new Date("01/02/2013")],
        [2, new Date("01/03/2013")]
      ]
    }
  ],
  yAxis: {
    type: "date"
  }
});
</script>
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    {
      type: "scatter",
      data: [
        [2, 5],
        [2, 7],
        [2, 11123]
      ]
    }
  ],
  yAxis: {
    type: "log"
  }
});
</script>

If set to true the chart will display the y axis. By default the y axis is visible.

Default: true

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  yAxis: {
    visible: false
  },
  series: [
    { type: "scatter", data: [[1, 2]] }
  ]
});
</script>