dojo中chart参数

在轴的定义中使用的可选参数。



vertical: Boolean
一个标志,表示一个轴是垂直的(即轴)或水平。默认为假(横向)。
fixUpper: String
将坐标轴上的最大值与指定的刻度水平对齐。选项是“major大”,“minor小”,“micro微”,或“none没有”。默认为“none无”。
fixLower: String
将坐标轴上的最小值与指定的刻度水平对齐。选项是“major大”,“minor小”,“micro微”,或“none没有”。默认为“none无”。
natural: Boolean
确保刻度线是在自然的数字智商。默认是false。
leftBottom: Boolean
反对:使用位置替代。竖轴的位置;如果为true,经放置在图表的左下角。默认是true;
includeZero: Boolean
坐标轴渲染时包括0,默认是false。
fixed: Boolean
强制所有的坐标轴标签为固定号码。默认为true。
majorLabels: Boolean
在主要的刻度线上绘制标签,默认为true。
minorTicks: Boolean
在坐标轴上绘制较小的刻度,默认是true。
minorLabels: Boolean
当有足够的空间时,在更小的刻度上添加标签。默认是true。
microTicks: Boolean
在坐标轴上绘制微刻度。默认为false。
htmlLabels: Boolean
使用HTML标记(相对于本地矢量图形引擎)绘制标签。默认是true。
min: Number
坐标轴上的最小值。默认是0.
max: Number
坐标轴上的最大值。默认是1.
from: Number
强制图表渲染的数据可见值从这个值开始。默认为0.
to: Number
强制图表渲染的数据可见值到这个值为止,默认为1.
majorTickStep: Number?
The amount to skip before a major tick is drawn. When not set the major ticks step is computed from the data range.

minorTickStep: Number
The amount to skip before a minor tick is drawn. When not set the minor ticks step is computed from the data range.

microTickStep: Number?
The amount to skip before a micro tick is drawn. When not set the micro ticks step is computed from
labels: Object[]?
主要刻度的标签数组,包含对应的数字值,以值的大小排序。
labelFunc: Function?
An optional function to use to compute label text. It takes precedence over the default text when available. The function must be of the following form:

function labelFunc(text, value, precision) {}

`text` is the already pre-formatted text. Pre-formatting is done using `dojo/number` 

is available, `Date.toFixed` otherwise.

`value`  is the raw axis value.
`precision` is the requested precision to be applied.
maxLabelSize: Number?


标签的最大大小,以像素为单位。用于可选标签功能
stroke: dojox.gfx.Stroke?
An optional stroke to be used for drawing an axis.
majorTick: Object?
An object containing a dojox.gfx.Stroke, and a length (number) for a major tick.
minorTick: Object?
An object containing a dojox.gfx.Stroke, and a length (number) for a minor tick.
microTick: Object?
An object containing a dojox.gfx.Stroke, and a length (number) for a micro tick.
tick: Object?
An object containing a dojox.gfx.Stroke, and a length (number) for a tick.
font: String
标签字体的可选定义(如在css中使用的字体属性)
fontColor: String|dojo.Color
用于绘制标签的可选颜色
titleGap: Number
轴的标题和轴标签之间的一个可选的差距
titleFont: String?
轴标题的一个可选字体定义
titleFontColor: String
轴标题颜色
titleOrientation: String
轴标题的一个可选方向。"axis"代表面向轴,"away"代表背向轴。如果没有值,将使用"axis"。
enableCache: Boolean
Whether the ticks and labels are cached from one rendering to another. This improves the rendering performance of successive rendering but penalize the first rendering. For labels it is only working with gfx labels not html ones.  Default false.
dropLabels: Boolean?
Whether the axis automatically drops labels at regular interval or not to avoid labels overlapping. This gives better results but require more computations.  You can disable it to save computation time when you know your labels won't overlap. Default is true.
labelSizeChange: Boolean?
Indicates to the axis whether the axis labels are changing their size on zoom. If false this allows to optimize the axis by avoiding recomputing labels maximum size on zoom actions. Default is false.
position: String?
The position of the axis. Values: "leftOrBottom", "center" or "rightOrTop". Default is "leftOrBottom".


this.chart = new Chart(this.chartDivNode,{
    title:"",
    titleFont:"normal normal bold 15pt Microsoft YaHei" //暂未知 暂未知 加粗 字号 字体
});

this.chart.setTheme(PrimaryColors)
    .addPlot("default", {
        type: Pie,      //统计图类型:饼图(Columns:柱状图,Bars:水平方向的柱状图)
        font: "Microsoft YaHei",   //图内字体
        fontColor: "black",        //图内字体颜色
        labelOffset: 30,
        labels:false,              //是否显示标注,饼图中的扇形内文字或柱图立柱内文字
        //labelStyle:"columns",        //标注的样式,默认为在圆形之内,columns牵引线
        radius: 90                   //饼图直径
//      gap:5                      //柱图立柱间距
    }).addSeries("Series Pie", data);


.addAxis("x", {
    //title: "",                    坐标轴标题
    titleFontColor: "black",
    titleOrientation:"away",        //标题正对或反对于轴,axis/away
    max:6,                          //轴刻度最大值
    includeZero: true,
    natural: true,
    //fixLower: "major",
    fixUpper: "micro",
    //maxLabelSize:"20",
    dropLabels:false,              //是否在空间不够时选择性的显示坐标值
    rotation:30,                   //坐标值旋转角度
    //labels:this.xAxisLabels
    labels: [
        {value: 0, text: ""},{value: 1, text: "易开发"},{value: 2, text: "较易开发"},{value: 3, text: "较难开发"},
        {value: 4, text: "难开发"},{value: 5, text: "不可开发"},{value: 6, text: "其他面积"}
    ]
})

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值