0

我正在从 WEB API 获取星期一到星期五的班级数据并分配给VIEWBAG,这些数据显示在同步融合图表中。现在在运行期间,当我单击“周一至周五”时,它会显示空白图表。我想禁用Graph 中“Monday To Friday”文本的点击。

<ejs-chart id="container" title="Daily Class Taken" width="60%">
        <e-chart-primaryxaxis valueType="ClassData"></e-chart-primaryxaxis>
        <e-series-collection>
            <e-series dataSource="ViewBag.dataSource" fill="#FFFF00" name="Monday - Sunday" xName="DateModified" width="2" opacity="1" yName="ViewDuration" type="@Syncfusion.EJ2.Charts.ChartSeriesType.Column">
            </e-series>
        </e-series-collection>
    </ejs-chart>
4

1 回答 1

0

我们建议您禁用图例的toggleVisibility以实现您所需的场景。请检查以下示例和代码段。

<ejs-chart>
    <e-chart-legendsettings toggleVisibility="false"></e-chart-legendsettings>
</ejs-chart>

示例: https ://www.syncfusion.com/downloads/support/directtrac/general/ze/ToggleVisibility-1693683250.zip

UG: https ://ej2.syncfusion.com/aspnetcore/documentation/chart/legend/#series-selection-on-legend

于 2021-08-10T13:20:32.087 回答