如何在剑道图表工具提示中隐藏条形值?

问题描述

我有一个这样的图表:

@(Html.Kendo().Chart<Model>()
    .Name("chart")
    .Title("Evolution")
    .RenderAs(RenderingMode.Canvas)
    .Pannable(pan => pan.Lock(ChartAxisLock.Y))
    .Zoomable(zoom => zoom.Mousewheel(ms => ms.Lock(ChartAxisLock.Y)).Selection(se => se.Lock(ChartAxisLock.Y)))
    .Legend(legend => legend
        .Position(ChartLegendPosition.Bottom)
    )
    .DataSource(ds =>
        ds.Read(read => read.Action("Read","Controller",new
        {
            Area = "Area"
        })
        ))
    .Events(ev => ev.DataBound("onDataBound").ZoomEnd("zoom"))
    .SeriesDefaults(seriesDefaults => seriesDefaults
            .Line()
            .MissingValues(ChartLineMissingValues.Gap)
        )
    .Series(series =>
    {
        series.Area(model => model.itemValue).Name("Value").Color("#ff1c1c").Axis("Value").VisibleInLegend(false);
        series.Area(model => model.itemName).Name("Name").Color("#ffae00").Axis("Name");
    })
    .CategoryAxis(axis => axis
        .Categories(a => a.Axis)
        .Labels(label => label.Rotation("auto").Step(20))
        .Justify(true)
    )
    .ValueAxis(axis => axis
        .Numeric("Value")
        .Min(-30)
        .Max(30)
        .AxisCrossingValue(-30)
    )
    .ValueAxis(axis => axis
        .Numeric("Name")
        .Min(-30)
        .Max(30)
        .AxisCrossingValue(-30)
    )
    .Tooltip(tooltip => tooltip
        .Visible(true)
        .Shared(true)
        .Format("{0:N2}")
    )
)

itemValue用于表示图表上有一个值,itemName是值的名称,它不会显示在图表上,仅在工具提示上具有名称。

问题是,如何隐藏图表的工具提示中的itemValue值?因为它的值太高而无法显示,我只想显示名称。

如果有人知道替代方法,我也将不胜感激。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...