xAxis.notes.data.label Object

The label of the note.

xAxis.notes.data.label.background String

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

Example - set the x axis note label background

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            background: "orange"
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.border Object

The border of the label.

Example - set the x axis note label border

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            border: {
              color: "green",
              dashType: "dashDot",
              width: 1
            }
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.border.color String (default: "black")

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

Example - set the x axis note label border color

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            border: {
              color: "green"
            }
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.border.dashType String (default: "solid")

The dash type of the border.

The following dash types are supported:

  • "dash" - a line consisting of dashes
  • "dashDot" - a line consisting of a repeating pattern of dash-dot
  • "dot" - a line consisting of dots
  • "longDash" - a line consisting of a repeating pattern of long-dash
  • "longDashDot" - a line consisting of a repeating pattern of long-dash-dot
  • "longDashDotDot" - a line consisting of a repeating pattern of long-dash-dot-dot
  • "solid" - a solid line

Example - set the x axis note label border dash type

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            border: {
              dashType: "dashDot"
            }
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.border.width Number (default: 0)

The width of the border in pixels. By default the border width is set to zero which means that the border will not appear.

Example - set the x axis note label border width

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            border: {
              width: 1
            }
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.color String

The text color of the note label. Accepts a valid CSS color string, including hex and rgb.

Example - set the x axis note label color as a hex string

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            color: "#aa00bb"
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.font String (default: "12px Arial,Helvetica,sans-serif")

The font style of the note label.

Example - set the x axis note label font

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            font: "20px sans-serif"
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.template String|Function

The template which renders the labels.

The fields which can be used in the template are:

  • value - the axis value

The text can be split into multiple lines by using line feed characters ("\n").

Example - set the value axis note label template as a string

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            template: "Avg: #: value #"
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.visible Boolean (default: true)

If set to true the chart will display the x axis notes label. By default the x axis notes label are visible.

Example - hide the x axis note label

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "label",
            visible: false
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.rotation Number (default: 0)

The rotation angle of the label. By default the label are not rotated.

Example - rotate the x axis note label

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "label",
            rotation: 90
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.format String (default: "{0}")

The format used to display the note label. Uses kendo.format. Contains one placeholder ("{0}") which represents the axis value.

Example - set the x axis note label format

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            format: "val: {0}"
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.text String

The label note text.

Example - set the x axis label note text

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg"
          }
        }]
      }
    }
  });
</script>

xAxis.notes.data.label.position String (default: "inside")

The position of the x axis note label.

  • "inside" - the label is positioned inside of the icon.
  • "outside" - the label is positioned outside of the icon.

Example - set the x axis note line width

<div id="chart"></div>
<script>
  $("#chart").kendoChart({
    series: [{
      type: "scatter",
      data: [[1, 2], [2, 3]]
    }],
    xAxis: {
      notes: {
        data: [{
          value: 1.3,
          label: {
            text: "avg",
            position: "outside"
          }
        }]
      }
    }
  });
</script>
In this article
Not finding the help you need?