4

如何使用 chart.addAxis 方法定义不会在折线图的水平轴上反转的标题。目前我的代码如下所示。发生的情况是,当“X 轴”被渲染时,它会倒置。

chart1.setTheme(dojox.charting.themes.ThreeD);

chart1.addAxis("x", {
  title: 'X Axis',
  range: { lower: 0, upper: 70},
  //to enable scaling of ticks
  //majorTickStep: 4,
  //minorTickStep: 2,
  //microTickStep: 1
  //to enable min and max range
  //min: 0,
  //max: 10,
  showTicks : true,
  min: 0,
       max: 10,
  fixLower: "major", 
      fixUpper: "major",
      majorTick: { stroke: "black", length: 3 },
      minorTick: { stroke: "gray", length: 3 }
});
chart1.addAxis("y", {
  title: 'Y Axis',
      vertical: true,
  scale: 2 ,
  showTicks : true,
      fixLower: "major", 
      fixUpper: "major",
      majorTick: { stroke: "black", length: 3},
      minorTick: { stroke: "gray", length: 3 },
  //htmlLabels: false
});
4

1 回答 1

7

titleOrientation: "away"

请参阅文档

参数: titleOrientation
类型:字符串
默认值: axis
描述:确定标题对轴的方向,通过“axis”朝向轴,或者通过“away”远离轴。

于 2011-07-26T13:31:15.107 回答