简体   繁体   English

WSO2仪表板小工具定制

[英]WSO2 dashboard gadget customization

I'm using WSO2 DAS product and I'm using a deafult gadget provided by WS02 product; 我正在使用WSO2 DAS产品,并且正在使用WS02产品提供的默认工具; when the gadget receives data it's all correct but the legend of data is moved on the right cutting words and It's not so good to visualize. 当小工具接收到数据时,它们都是正确的,但是数据的图例会在正确的切割词上移动,并且视觉效果不太好。 Attachment included. 包含附件。

Regards. 问候。 enter image description here 在此处输入图片说明

If your data set has lengthy characters, you can increase right padding of the chart. 如果您的数据集包含冗长的字符,则可以增加图表的右填充。 When you generate a gadget, a directory for the gadget is created inside following directory 生成小工具时,将在以下目录中创建该小工具的目录

<DAS-PACK-HOME>/repository/deployment/server/jaggeryapps/portal/store/carbon.super/fs/gadget/

Inside there go js directory and open the JS generated for bar chart. 在里面进入js目录并打开为条形图生成的JS。 This file contains the chart drawing logic, here VizGrammar [1][2] has been used as the charting library and configuration for that is generated inside buildChartConfig() function. 该文件包含图表绘制逻辑,此处VizGrammar [1] [2]已用作图表库,并在buildChartConfig()函数内部生成了该图表的配置。 There add following line to reconfigure the padding, here i have incrased right padding as 90. 在那里添加以下行以重新配置填充,这里我将右填充增加为90。

conf.padding = {"top": 10, "left": 50, "bottom": 40, "right": 90}

[1] http://wso2.github.io/VizGrammar/samples/ [1] http://wso2.github.io/VizGrammar/samples/

[2] https://github.com/wso2/VizGrammar [2] https://github.com/wso2/VizGrammar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM