widget - 通过 Syncfusion Dashboard Designer 平台自定义小部件
问题描述
有人可以指导我如何在 Syncfusion 中自定义小部件。例如,如果我在设计器中拖动条形图小部件并单击以显示值,我看不到可以使这些值的字体大小变大的选项。那么有什么方法可以在仪表板设计器中做到这一点,还是我需要购买一些附加组件才能做到这一点?任何帮助将不胜感激。
解决方案
@user10200276:我们可以通过覆盖仪表板服务器级别的 CSS 样式来自定义仪表板小部件的字体大小。查找CSS 类详细信息及其在适用仪表板小部件中的用法的文档链接。只需在以下服务器位置添加所需的样式类即可自定义字体。
服务器安装位置:
C:\Syncfusion\Dashboard Server\DashboardServer.Web\Views\FileRender
C:\Syncfusion\Dashboard Server\DashboardServer.Web\Views\EmbedFileRender
在上述位置,2 个 CSHTML 文件将与所附图像中的一样。
[
打开这两个文件,移动到样式标签,包含所需的样式并保存文件。
[
现在在 IIS 管理器中刷新服务器并通过清除缓存内存(即 Ctrl + F5)检查浏览器中的更改。
以下 CSS 样式类用于自定义条形图小部件。
/* Used to customize the Y axis title */
.e-dashboardviewer .dashboardChartControl text[id*='YAxisTitle']{
font-size: 16px !important;
}
/* Used to customize the Y axis lables */
.e-dashboardviewer .dashboardChartControl text[id*='YLabel']{
font-size: 16px !important;
}
/* Used to customize the X axis title */
.e-dashboardviewer .dashboardChartControl text[id*='XAxisTitle']{
font-size: 16px !important;
}
/* Used to customize the Primary X axis label */
.e-dashboardviewer .dashboardChartControl text[id*='PrimaryAxis_XLabel']{
font-size: 16px !important;
}
/* Used to customize the data labels item */
.e-dashboardviewer .dashboardChartControl text[id*='SeriesText']{
font-size: 16px !important;
}
/* Used to customize the legend item */
.e-dashboardviewer .dashboardChartControl text[id*='LegendItem']{
font-size: 16px !important;
}
参考截图:
推荐阅读
- date - Power BI 中的层次结构日期
- reactjs - 在类型 '[] | 上找不到具有类型参数的索引签名'字符串' iCommits'.ts(7053)
- c++ - 为什么我的 .icns 图标不能在 OSX 上与 QT/C++ 一起使用?
- python-3.x - 无法从 selenium 中的 iframe 标记中获取属性('src')
- html - 提交表单后将文件从 HTTP 服务器推送到客户端
- http - 在后台处理时响应 HTTP 请求
- excel - 在 VBA 中整合动态变化的数据
- python - method() 接受 1 个位置参数,但给出了 4 个?
- python - 在 Numpy 数组中的第一个数字之前删除 Nan 出现/s
- google-apps-script - 具有复杂分组的 Google 表格图表