new XUILineConsumption()
Methods
-
AddDataForProp(arrData)
-
增加数据线
Parameters:
Name Type Description arrData
Array 增加数据 -
GetOneData(strName, nIndex)
-
通过名字获取数据
Parameters:
Name Type Description strName
String 线名 nIndex
Number 位置的索引 -
SetAddAreaSize(strName, strArea, strStartTime, strEndTime)
-
增加区域范围
Parameters:
Name Type Description strName
String 类名 strArea
String 区域名 strStartTime
String 起点时间 strEndTime
String 结束时间 -
SetAddData(strName, arrData)
-
增加数据分类
Parameters:
Name Type Description strName
String 增加的类名 arrData
Array 增加的数据 -
SetAreaColor(strName, strColor)
-
设置区域色
Parameters:
Name Type Description strName
String 类名 strColor
String 区域色 Properties:
Name Type Description AreaColor
Collection ["示例一","0x00ffffff"] -
SetAreaSize(strName, strArea, nIndex, strStartTime, strEndTime)
-
设置区域范围
Parameters:
Name Type Description strName
String 类名 strArea
String 区域名 nIndex
Number 第几个区域 strStartTime
String 起点时间 strEndTime
String 结束时间 Properties:
Name Type Description AreaSize
Collection ["示例一","早高峰",0,"07:30","10:00"] -
SetBackgroundColor(strColor)
-
设置背景色
Parameters:
Name Type Description strColor
String 背景色 Properties:
Name Type Description BgColor
Color "0xffffffff" -
SetClearData()
-
设置清空数据
-
SetData(strName, nIndex, nData)
-
通过名字修改数据
Parameters:
Name Type Description strName
String 线名 nIndex
Number 位置的索引 nData
Number 新数据 -
SetDelAreaSize(strName, strArea)
-
删除区域范围
Parameters:
Name Type Description strName
String 类名 strArea
String 区域名 -
SetLegendShow(bShow)
-
说明是否显示
Parameters:
Name Type Description bShow
Boolean 是否显示 Properties:
Name Type Description LegendShow
Boolean false -
SetLineColor(strName, strColor)
-
设置指定的线颜色
Parameters:
Name Type Description strName
String 分类的名字 strColor
String 指定的线颜色 Properties:
Name Type Description LineColor
Collection ["示例一","0xffc23531"] -
SetLineTpye(sType)
-
设置线类型
Parameters:
Name Type Description sType
String 线类型 Properties:
Name Type Description LineTpye
Combo ["solid","dashed","dotted"] -
SetLineWidth(nWidth)
-
设置线宽
Parameters:
Name Type Description nWidth
Number 线宽 Properties:
Name Type Description LineWidth
Number 2 -
SetNodeSize(nSize)
-
设置节点大小
Parameters:
Name Type Description nSize
Number 节点大小 Properties:
Name Type Description NodeSize
Number 4 -
SetNodeType(sType)
-
设置线节点类型
Parameters:
Name Type Description sType
String 线节点类型 Properties:
Name Type Description NodeType
Combo ["emptyCircle","rect","circle","roundRect", "triangle", "diamond", "pin", "arrow", "none"] -
SetRemoveClass(nClass)
-
删除数据分类
Parameters:
Name Type Description nClass
Number 要删除的分类的索引 -
SetRemoveClassByName(strName)
-
通过名字删除数据
Parameters:
Name Type Description strName
String 线名 Properties:
Name Type Description RemoveClassByName
String "线名" -
SetSubTextName(strName)
-
设置副标题名
Parameters:
Name Type Description strName
String 副标题名 Properties:
Name Type Description SubTextName
String "示例副标题" -
SetTextName(strName)
-
主标题名
Parameters:
Name Type Description strName
String 主标题名 Properties:
Name Type Description TextName
String "示例主标题" -
SetVisualMap(nIndex, nLte, nGt, strColor)
-
设置段映射
Parameters:
Name Type Description nIndex
Number 分段的索引 nLte
Number 小于等于 nGt
Number 大小于 strColor
String 结束时间 Properties:
Name Type Description VisualMap
Collection [0,8,5,"0xffff0000"] -
SetXAxisName(strName)
-
设置X轴命名
Parameters:
Name Type Description strName
String X轴命名 Properties:
Name Type Description XAxisName
String "" -
SetXAxisNameSize(nSize)
-
设置X轴名称大小
Parameters:
Name Type Description nSize
Number X轴名称大小 Properties:
Name Type Description XAxisNameSize
Number 12 -
SetXAxisSplitLine(bShow)
-
设置是否显示X轴分割线
Parameters:
Name Type Description bShow
Boolean X轴分割线 Properties:
Name Type Description XAxisSplitLine
Boolean false -
SetXAxisTextColor(strColor)
-
设置X轴文字颜色
Parameters:
Name Type Description strColor
String X轴文字颜色 Properties:
Name Type Description XAxisTextColor
Color "0xff000000" -
SetXAxisTextSize(nSize)
-
设置X轴文字大小
Parameters:
Name Type Description nSize
Number X轴文字大小 Properties:
Name Type Description XAxisTextSize
Number 14 -
SetXAxisValue(arrName)
-
X轴刻度名
Parameters:
Name Type Description arrName
Array 刻度名 Properties:
Name Type Description XAxisValue
Array ["00:00", "01:15", "02:30", "03:45", "05:00", "06:15", "07:30", "08:45", "10:00", "11:15", "12:30", "13:45", "15:00", "16:15", "17:30", "18:45", "20:00", "21:15", "22:30", "23:45"] -
SetYAxisName(strName)
-
设置Y轴命名
Parameters:
Name Type Description strName
String X轴命名 Properties:
Name Type Description YAxisName
String "" -
SetYAxisNameSize(nSize)
-
设置Y轴名称大小
Parameters:
Name Type Description nSize
Number Y轴名称大小 Properties:
Name Type Description YAxisNameSize
Number 12 -
SetYAxisSplitLine(bShow)
-
设置是否显示Y轴分割线
Parameters:
Name Type Description bShow
Boolean Y轴分割线 Properties:
Name Type Description YAxisSplitLine
Boolean true -
SetYAxisTextColor(strColor)
-
设置Y轴文字颜色
Parameters:
Name Type Description strColor
String Y轴文字颜色 Properties:
Name Type Description YAxisTextColor
Color "0xff000000" -
SetYAxisTextSize(nSize)
-
设置Y轴文字大小
Parameters:
Name Type Description nSize
Number Y轴文字大小 Properties:
Name Type Description YAxisTextSize
Number 14