XUIGradline()

new XUIGradline()

Methods

AddLengendByIndex(nIndex)

索引添加图列
Parameters:
Name Type Description
nIndex Number

AddLine()

添加一条折线

AddPolyLine(strId, strName)

添加一条折线
Parameters:
Name Type Description
strId String 折线的唯一标记
strName String 名称

IsLinesSmooth() → {Boolean}

是否开启平滑处理
Returns:
Boolean

IsXAxisBoGap() → {Boolean}

x轴和数据是否有留白
Returns:
Boolean

SetAddDataByIndex(nIndex, nAddData)

增加数据
Parameters:
Name Type Description
nIndex Number x轴添加数据
nAddData Number y轴添加数据
Properties:
Name Type Description
AddDataByIndex Collection [0, 0]

SetAreaColorByIndex(nIndex, strColor1, strColor2, strColor3)

按索引设置折线的区域渐变
Parameters:
Name Type Description
nIndex Number 下标
strColor1 String 颜色1
strColor2 String 颜色2
strColor3 String 颜色3

SetArrData(arrData)

设置一组数据
Parameters:
Name Type Description
arrData Array
Properties:
Name Type Description
setArr Array [11, 16, 25, 12, 15, 22, 10, 13, 21, 16, 23]

SetBackgroundColor(strColor)

设置背景色
Parameters:
Name Type Description
strColor String 背景色
Properties:
Name Type Description
BgColor Color "0xff09225B"

SetDataByIndex(nIndex, arrData)

设置数据按索引
Parameters:
Name Type Description
nIndex Number 索引从0开始
arrData Array 数值

SetLineGradient(nIndex, strColor1, strColor2, strColor3)

按索引设置折线的渐变色
Parameters:
Name Type Description
nIndex Number
strColor1 String 颜色1
strColor2 String 颜色2
strColor3 String 颜色3

SetLinesSmooth(bSmooth)

设置所有折线不开启平滑处理
Parameters:
Name Type Description
bSmooth Boolean
Properties:
Name Type Description
bSmoothLines Boolean false

SetmarkPoint(arrSzie)

按索引设置标记点的大小
Parameters:
Name Type Description
arrSzie Array
Properties:
Name Type Description
markPointSize Array [40,40]

SetPointData(strLab, nVal)

设置标记点的数据
Parameters:
Name Type Description
strLab String
nVal Number

SetXAxisBoGap(bBoGap)

设置X轴和数据无留白
Parameters:
Name Type Description
bBoGap Boolean
Properties:
Name Type Description
bXAxisBoGap Boolean false

SetxAxisLabel(arrLab)

设置X轴标签名称
Parameters:
Name Type Description
arrLab Array
Properties:
Name Type Description
setArrLabel Array ["12:00","12:05","12:10","12:15","12:20","12:25","12:30","12:35","12:40","12:45","12:50"]

SetXAxisYAxisSize(nXAxis, nYAxis)

设置X轴Y轴文本大小
Parameters:
Name Type Description
nXAxis Number X轴文本大小
nYAxis Number Y轴文本大小