指定轴值和替换文本之间的映射。
参数frame一个TextFrame对象示例(报告或视图)
importPackage(半岛o客服inetsoft.graph) importPackage(inetsoft.graph.data) importPackage(inetsoft.graph.element) importPackage(inetsoft.graph.aesthetic) importPackage(inetsoft.graph.scale) importPackage(inetsoft.graph.coord) importPackage(inetsoft.graph.guide.form) var arr = [["State","Quantity"],["NJ",20000],["NY",30000]];dataset = new DefaultDataSet(arr);graph = new EGraph();var elem = new IntervalElement(“状态”,“数量”);var cscale = new CategoricalScale(“State”);var tframe = new DefaultTextFrame();tframe。setText(新泽西,新泽西);tframe。setText(“纽约”,“纽约”); var aspec = new AxisSpec(); aspec.setTextFrame(tframe); cscale.setAxisSpec(aspec); graph.setScale("State", cscale); graph.addElement(elem);
指定轴文本的显示。
参数指定一个TextSpec对象示例(报告或视图)
importPackage(半岛o客服inetsoft.graph) importPackage(inetsoft.graph.data) importPackage(inetsoft.graph.element) importPackage(inetsoft.graph.aesthetic) importPackage(inetsoft.graph.scale) importPackage(inetsoft.graph.coord) importPackage(inetsoft.graph.guide.form) var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];dataset = new DefaultDataSet(arr);graph = new EGraph();var elem = new IntervalElement(“状态”,“数量”);var qscale = new LinearScale("Quantity");var spec =新AxisSpec();var textspec = new textspec ();textspec.setColor (java.awt.Color (0 xff0000));aspec.setTextSpec (textspec);qscale.setAxisSpec (aspec); graph.setScale("Quantity", qscale); graph.addElement(elem);
指定轴刻度标记是可见还是隐藏。
参数布尔值:可见时为true,不可见时为false示例(报告或视图)
importPackage(半岛o客服inetsoft.graph) importPackage(inetsoft.graph.data) importPackage(inetsoft.graph.element) importPackage(inetsoft.graph.aesthetic) importPackage(inetsoft.graph.scale) importPackage(inetsoft.graph.coord) importPackage(inetsoft.graph.guide.form) var arr = [["State", "Quantity"], ["NJ", 200], ["NY", 300]];dataset = new DefaultDataSet(arr);graph = new EGraph();var elem = new IntervalElement(“状态”,“数量”);var qscale = new LinearScale("Quantity");var spec =新AxisSpec();aspec.setTickVisible(假);qscale.setAxisSpec (aspec);图。setScale(“数量”,qscale); graph.addElement(elem);
GraphElement对象包含表示数据的可视元素。例如,PointElement是一个将数据元组表示为点的GraphElement。
为graphhelement对象添加一个维度。维度绘制在x轴上,或嵌套坐标的外部坐标上。
参数包含维度名称的字段字符串示例(报告或视图)
importPackage(半岛o客服inetsoft.graph) importPackage(inetsoft.graph.data) importPackage(inetsoft.graph.element) importPackage(inetsoft.graph.element) importPackage(inetsoft.graph.scale) importPackage(inetsoft.graph.scale) importPackage(inetsoft.graph.coord) importPackage(inetsoft.graph. form) var arr = [["State", "City", "Quantity"], ["NJ","Edison",2500], ["NJ","Piscataway",3000], ["NY","NY City",5000],["NY","Yonkers",450]];dataset = new DefaultDataSet(arr);graph = new EGraph();var elem = new IntervalElement(“状态”,“数量”);elem.addDim(“城市”);graph.addElement (elem);
前一:轴的网格 |
下一个:
图数据
|