Kendo UI labels TagHelper ChartValueAxisLabelsSettingsTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("labels", ParentTag = "value-axis-item", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("chart-value-axis-labels-border", new string[] { "chart-value-axis-labels-margin", "chart-value-axis-labels-padding", "chart-value-axis-labels-rotation" })]
[SuppressTagRendering]
public class ChartValueAxisLabelsSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperChildBaseChartValueAxisLabelsSettingsTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-chart name="chart">
<value-axis>
<value-axis-item>
<labels background="red"></labels>
</value-axis-item>
</value-axis>
</kendo-chart>
Child Tags
Constructors
Initializes a new instance of the ChartValueAxisLabelsSettingsTagHelper class.
public ChartValueAxisLabelsSettingsTagHelper()
Properties
The background color of the labels. Accepts a valid CSS color string, including hex and rgb.
public string Background { get; set; }
The text color of the labels. Accepts a valid CSS color string, including hex and rgb.
public string Color { get; set; }
The font style of the labels. Accepts a valid CSS color string, for example "20px 'Courier New'".
public string Font { get; set; }
The format used to display the labels. Uses kendo.format. Contains one placeholder ("{0}") which represents the category value.
public string Format { get; set; }
If set to true the chart will mirror the axis labels and ticks. If the labels are normally on the left side of the axis, mirroring the axis will render them to the right.
public bool? Mirror { get; set; }
Specifies the position of the labels.
public ChartAxisLabelsPosition? Position { get; set; }
The rotation angle (in degrees) of the labels. By default the labels are not rotated. Angles increase clockwise and zero is to the left. Negative values are acceptable. Can be set to "auto" if the axis is horizontal in which case the labels will be rotated only if the slot size is not sufficient for the entire labels.
[HtmlAttributeName("rotation")]
public string RotationValue { get; set; }
The number of labels to skip. By default no labels are skipped.
public double? Skip { get; set; }
Label rendering step. Every n-th label is rendered where n is the step
public double? Step { get; set; }
The template which renders the labels.The fields which can be used in the template are: value - the value value.
public string Template { get; set; }
The template which renders the labels.The fields which can be used in the template are: value - the value value. This option expects the name of a JavaScript function that will be called to return the template.
public string TemplateHandler { get; set; }
The template which renders the labels.The fields which can be used in the template are: value - the value value. This option expects the ID of the script element that contains the template.
public string TemplateId { get; set; }
Configures the templates for the ChartValueAxisLabelsSettings.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
The template which renders the labels.The fields which can be used in the template are: value - the value value. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent TemplateView { get; set; }
If set to true the chart will display the value axis labels. By default the category axis labels are visible.
public bool? Visible { get; set; }
A function that can be used to create a custom visual for the labels. The available argument fields are: createVisual - a function that can be used to get the default visual.; culture - the default culture (if set) on the label; format - the default format of the label; options - the label options.; rect - the kendo.geometry.Rect that defines where the visual should be rendered.; sender - the chart instance (may be undefined).; text - the label text. or value - the category value.
public string Visual { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
Serializes the defined templates.