简体   繁体   English

如何在jit infovis工具箱中更改注入目标以创建树图?

[英]how to change injection target to create treemap in jit infovis toolkit?

I need to create 2 squarified treemaps in one web page. 我需要在一个网页中创建2个平方树形图。 I used jit infovis toolkit to help create this treemap. 我使用jit infovis工具箱来帮助创建此树形图。 is it possible to create treemaps not using div with id "infovis"?cause when i change the id of div into something else like "test" for example, it cause an error treemap doesn't work. 是否有可能不使用ID为“ infovis”的div创建树图?例如,当我将div的ID更改为“ test”之类的其他内容时,它会导致错误的树图不起作用。 I also already change the "inject into" property in jit javascript function that used to create treemap . 我还已经更改了用于创建treemap的jit javascript函数中的“ inject into”属性。 Please help 请帮忙

Yes, it is possible to do that. 是的,可以这样做。

In the standard examples of InfoVis, the div "infovis" is contained in the "center-container". 在InfoVis的标准示例中,div“ infovis”包含在“ center-container”中。 The html page generally includes a css file base.css. html页面通常包括一个css文件base.css。 This file applies certain rules to both "infovis" and "center-container". 该文件对“ infovis”和“ center-container”都应用了某些规则。

#infovis {
  position:relative;
  width:600px;
  height:600px;
  margin:auto;
  overflow:hidden;
} 

And for center-container.. 以及用于中心容器。

#center-container {
  width:600px;
  left:200px;
  background-color:#1a1a1a;
  color:#ccc;
}

You can check this in html file which renders the visualization. 您可以在呈现可视化效果的html文件中进行检查。 You should make sure that the div in which you want to inject the visualization, is applied same/similar rules. 您应确保要在其中注入可视化效果的div应用相同/相似的规则。 You may also have to do some more changes in your html file and the css file, to make sure that you have a proper hierarchy of divs and all rules of base.css are applied properly to them. 您可能还需要在html文件和css文件中进行一些其他更改,以确保您具有正确的div层次结构,并且所有base.css规则均已正确应用于它们。 This is all I can say without looking at your html file and your code. 我只能说这些,而无需查看您的html文件和您的代码。

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

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