找回密码
 立即注册

QQ登录

只需一步,快速开始

ZenosZeng 讲师达人认证 悬赏达人认证
超级版主   /  发表于:2023-12-20 16:26  /   查看:655  /  回复:0
Wyn为客户提供了丰富的嵌入式分析能力,可以把做好的仪表板、报表以URL、DIV的方式业务系统,更深入的集成就可以自定义报表和仪表板设计器,将全部设计能力也集成到业务系统,这时候各个业务系统可能有自己的UI风格,希望对Wyn设计器的图标进行替换,这时候就可以通过以下方式来实现。


1、修改图标配色
如果只是希望修改图标的配色,可以用Wyn提供的系统主题自定义来实现,具体方法可参考帮助文档:
https://www.grapecity.com.cn/solutions/wyn/help/docs/back-stage/system-settings/appearance/custom-theme
image.png226169737.png


2、替换图标样式
如果你不仅希望替换颜色,而是替换整个图标,那么可以通过CSS覆盖的方式来实现:


覆盖报表设计器图标示例代码:
  1. <font size="3"><style>

  2. /* 替换元素管理的图标 */
  3. button[data-aid="Explorer_toggle"] i,
  4. button[data-aid="元素管理_toggle"] i{
  5.       background-image: url(icons/元素管理.png);
  6.       background-size: 20px 20px;
  7.       background-repeat: no-repeat;
  8.       background-position: center center;
  9.     }

  10. button[data-aid="Explorer_toggle"] svg,
  11. button[data-aid="元素管理_toggle"] svg{
  12.       display: none !important;
  13.     }


  14. /* 替换表格的图标 */
  15. div[data-aid="Table"] i,
  16. div[data-aid="表格"] i{
  17.       background-image: url(icons/表格.png);
  18.       background-size: 20px 20px;
  19.       background-repeat: no-repeat;
  20.       background-position: center center;
  21.     }

  22. div[data-aid="Table"] svg,
  23. div[data-aid="表格"] svg{
  24.       display: none !important;
  25.     }

  26. /* 替换元素管理的图标 */   
  27. div[data-aid="Chart"] i,
  28. div[data-aid="图表"] i{
  29.       background-image: url(icons/图表.png);
  30.       background-size: 20px 20px;
  31.       background-repeat: no-repeat;
  32.       background-position: center center;
  33.     }

  34. div[data-aid="Chart"] svg,
  35. div[data-aid="图表"] svg{
  36.       display: none !important;
  37.     }   
  38. </style></font>
复制代码
image.png829269714.png


覆盖仪表板设计器图标示例代码:
  1. <font size="3">  <style>
  2.     .gc-toolbar #copy i{
  3.       background-image: url(./icons/copy.png);
  4.       background-size: 20px 20px;
  5.       background-repeat: no-repeat;
  6.       background-position: center center;
  7.     }
  8.     .gc-toolbar #copy svg{
  9.       display: none;
  10.     }

  11.     .gc-toolbar #cut i{
  12.       background-image: url(./icons/cut.png);
  13.       background-size: 20px 20px;
  14.       background-repeat: no-repeat;
  15.       background-position: center center;
  16.     }
  17.     .gc-toolbar #cut svg{
  18.       display: none;
  19.     }

  20.     .gc-toolbar #paste i{
  21.       background-image: url(./icons/paste.png);
  22.       background-size: 20px 20px;
  23.       background-repeat: no-repeat;
  24.       background-position: center center;
  25.     }
  26.     .gc-toolbar #paste svg{
  27.       display: none;
  28.     }

  29.     button[data-aid="charts_toggle"] i{
  30.       background-image: url(./icons/chart.png);
  31.       background-size: 20px 20px;
  32.       background-repeat: no-repeat;
  33.       background-position: center center;
  34.     }

  35.     button[data-aid="charts_toggle"] svg{
  36.       display: none !important;
  37.     }

  38.     button[data-aid="visual_toggle"] i{
  39.       background-image: url(./icons/view.png);
  40.       background-size: 20px 20px;
  41.       background-repeat: no-repeat;
  42.       background-position: center center;
  43.     }

  44.     button[data-aid="visual_toggle"] svg{
  45.       display: none !important;
  46.     }

  47.     button[data-aid="gallery_toggle"] i{
  48.       background-image: url(./icons/template.png);
  49.       background-size: 20px 20px;
  50.       background-repeat: no-repeat;
  51.       background-position: center center;
  52.     }

  53.     button[data-aid="gallery_toggle"] svg{
  54.       display: none !important;
  55.     }

  56.     button[data-aid="panel-component-tree_toggle"] i{
  57.       background-image: url(./icons/tree.png);
  58.       background-size: 20px 20px;
  59.       background-repeat: no-repeat;
  60.       background-position: center center;
  61.     }

  62.     button[data-aid="panel-component-tree_toggle"] svg{
  63.       display: none !important;
  64.     }

  65.     button[Title="Visualization Wizard"] i,
  66.     button[Title="智能分析"] i
  67.     {
  68.       background-image: url(./icons/lights.png);
  69.       background-size: 20px 20px;
  70.       background-repeat: no-repeat;
  71.       background-position: center center;
  72.     }

  73.     button[Title="Visualization Wizard"] svg,
  74.     button[Title="智能分析"] svg{
  75.       display: none !important;
  76.     }
  77.   </style></font>
复制代码




更多嵌入式集成的方法和示例代码,可以从帮助文档获取,一起打造属于你自己的BI、报表产品。
https://www.grapecity.com.cn/solutions/wyn/help/docs/embedded-integration/embededintroduce

0 个回复

您需要登录后才可以回帖 登录 | 立即注册
返回顶部