My chart looks fairly good. 2 questions though. (See attached screen shot)
1) How can I make the Series labels only appear when the mouse hovers?
2) How do I format the Category Axis (Date) to "MMM d". My attempt below doesn't do anything to the date displayed.
1) How can I make the Series labels only appear when the mouse hovers?
2) How do I format the Category Axis (Date) to "MMM d". My attempt below doesn't do anything to the date displayed.
Html.Kendo().Chart<
AccountPerformance
>(Model.Results)
.Name("chart")
.Title("Market Value")
.Legend(legend => legend.Visible(false))
.Series(series =>
series.Line(model => model.Metrics.MarketValue)
.Name(Model.ColumnTitle)
.Labels(false)
)
.ValueAxis(axis => axis.Numeric()
.Labels(labels => labels.Format("{0:C0}")))
.CategoryAxis(axis => axis
.Categories(model => model.ObservationDate)
.Labels(labels =>
{
labels.Format("MMM d");
labels.Rotation(45);
} ))
.Render();