Using chart.addAxis and defining a title for the horizontal line on a Line graph the title is inverted

匿名 (未验证) 提交于 2019-12-03 08:54:24

问题:

How do you define a title that will not be inverted on the horizontal axis of a line graph, using the chart.addAxis method. Currently my code is seen below. What happens is when the "X Axis" is rendered it is inverted upside down.

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 }); 

回答1:

set titleOrientation: "away"

See the documentation

param: titleOrientation
type: string
default: axis
description: determine the title orientation to the axis, facing to the axis by "axis", or facing away from the axis by "away".



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!