[可视化] 多度量的图表的图例文本定位问题

52v0铂金二 显示全部楼层 发表于 2022-5-20 16:21:00 |阅读模式 打印 上一主题 下一主题
10
已解决
问题.png   图表为多个度量的线图,颜色区域未拖入字段  如何用locator来定位图例的标题区域和值区域   例如将设置好的123  使用脚本改成11

最佳答案

yhdata_Jenny 铂金四 关注Ta

2022-05-20 16:21:01

是否方便导出一个case辅助我们排查一下,通过管理系统-资源部署-资源导出
查看完整内容
回复

使用道具 举报

精彩评论7

yhdata_Jenny铂金四 显示全部楼层 发表于 2022-5-20 16:21:01
是否方便导出一个case辅助我们排查一下,通过管理系统-资源部署-资源导出
回复

使用道具 举报

WGM钻石二 显示全部楼层 发表于 2022-5-20 16:29:48
您好,图标的locator相关设置请参考帮助文档:https://www.yonghongtech.com/hel ... /scriptobjects.html
回复

使用道具 举报

52v0铂金二 显示全部楼层 发表于 2022-5-20 16:43:59
WGM 发表于 2022-5-20 16:29
您好,图标的locator相关设置请参考帮助文档:https://www.yonghongtech.com/help/Z-Suite/9.4/ch/scriptob ...

看过了 试了好多组合 没定位到
回复

使用道具 举报

WGM钻石二 显示全部楼层 发表于 2022-5-20 17:07:21
框出来了,你再试下。
不同的图例.png
图例标题和内容.png
回复

使用道具 举报

52v0铂金二 显示全部楼层 发表于 2022-5-20 17:40:13
WGM 发表于 2022-5-20 17:07
框出来了,你再试下。

不行  我写代码  把所有组合全部穷举了  代码没问题的话  应该是不行  是因为多个度量   然后颜色没有拖入字段导致的      颜色拖入了字段 应该能定位到     这个理应能用也定位到  但是不行  
回复

使用道具 举报

yhdata_Jenny铂金四 显示全部楼层 发表于 2022-5-20 18:15:46
Locator(["Color"], LEGEND_BAND, COLOR),这个不起作用吗
回复

使用道具 举报

52v0铂金二 显示全部楼层 发表于 2022-5-20 19:05:39
本帖最后由 52v0 于 2022-5-20 19:11 编辑
yhdata_Jenny 发表于 2022-5-20 18:15
Locator(["Color"], LEGEND_BAND, COLOR),这个不起作用吗

arr=["Col1"
,"Col2"
,"Col3"
,"Col4"
,"Col1(线图)"
,"Col2(线图)"
,"Col3(线图)"
,"Col4(线图)"
for(k in arr){
for(var i=1;i<8;i++){
for(var j=1;j<31;j++){
var loc=new Locator ([arr[k, j,i);
图表7.setFormat(loc,5)
图表7.setFormatPattern(loc,'11')
try{图表7.binding.markCol[arr[k.colorLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.colorLegend.setFormatPattern(loc,'11')}catch(err){}
try{图表7.binding.markCol[arr[k.patternLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.patternLegend.setFormatPattern(loc,'11')}catch(err){}
try{图表7.binding.markCol[arr[k.sizeLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.sizeLegend.setFormatPattern(loc,'11')}catch(err){}
}
}
var loc=new Locator(["Color", LEGEND_BAND, COLOR);
图表7.setFormat(loc,5)
图表7.setFormatPattern(loc,'11')
try{图表7.binding.markCol[arr[k.colorLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.colorLegend.setFormatPattern(loc,'11')}catch(err){}
try{图表7.binding.markCol[arr[k.patternLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.patternLegend.setFormatPattern(loc,'11')}catch(err){}
try{图表7.binding.markCol[arr[k.sizeLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.sizeLegend.setFormatPattern(loc,'11')}catch(err){}
var loc=new Locator([arr[k, LEGEND_BAND, COLOR);
图表7.setFormat(loc,5)
图表7.setFormatPattern(loc,'11')
try{图表7.binding.markCol[arr[k.colorLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.colorLegend.setFormatPattern(loc,'11')}catch(err){}
try{图表7.binding.markCol[arr[k.patternLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.patternLegend.setFormatPattern(loc,'11')}catch(err){}
try{图表7.binding.markCol[arr[k.sizeLegend.setFormat(loc,5);
图表7.binding.markCol[arr[k.sizeLegend.setFormatPattern(loc,'11')}catch(err){}
}


//我拿这段代码遍历完了 还是不行  
//论坛好像把连续的反中括号给自动去掉了
回复

使用道具 举报

高级模式
您需要登录后才可以回帖 登录 | 免费注册

  • 官方微信

    欢迎关注永洪服务号!收费为0,价值无限

    扫码关注
  • 新浪微博

    让每位用户轻松挖掘数据价值!

    访问新浪微博
  • 智能客服
50W

会员等你来哦

Copyright   ©2012-2024  北京永洪商智科技有限公司  (京ICP备12050607) 京公网安备110110802011451号 |联系社区管理员|《永洪社区协议》
返回顶部