using System;
using System.Collections.Generic;
namespace HDL_ON.UI.UI2.EnvironmentalScience
{
#region 折线图
public class EchartsOption
{
///
///
///
public string backgroundColor;
/////
/////
/////
//public EchartTitle title;
///
///
///
public List color;
///
///
///
public EchartTooltip tooltip;
///
///
///
public EchartGrid grid;
///
///
///
public EchartAxis xAxis;
///
///
///
public EchartAxis yAxis;
///
///
///
public List series;
public EchartsOption()
{
backgroundColor = "#fff";
color = new List { "#73A0FA", "#73DEB3", "#FFB761" };
tooltip = new EchartTooltip
{
trigger = "axis",
axisPointer = new EchartAxisPointer { type = "cross", crossStyle = new EchartCrossStyle { color = "#999" }, lineStyle = new EchartLineStyle { type = "dashed" } }
};
grid = new EchartGrid
{
left = "5%",
right = "5%",
bottom = "5%",
top = "5%",
containLabel = true
};
//grid = new EchartGrid2
//{
// left = 25,
// right = 55,
// bottom = 25,
// top = 45,
// containLabel = true
//};
xAxis = new EchartAxis
{
type = "category",
boundaryGap = false,
//splitLine = new EchartSplitLine { show = true },
//axisTick = new EchartAxisTick { show = true },
//axisLine = new EchartAxisLine { show = true },
axisLabel = new EchartAxisLabel
{
fontSize = 20,
},
};
yAxis = new EchartAxis
{
type = "value",
};
series = new List { };
}
}
public class EchartTextStyle
{
///
///
///
public string color;
///
///
///
public int fontSize;
///
///
///
public string fontWeight;
}
public class EchartTitle
{
///
/// 温度(℃)
///
public string text;
///
///
///
public string left;
///
///
///
public string top;
///
///
///
public EchartTextStyle textStyle;
}
public class EchartCrossStyle
{
///
///
///
public string color;
}
///
/// 线条属性
///
public class EchartLineStyle
{
///
/// 坐标轴刻度线宽
/// type | string
/// 可选:
/// 'solid'
/// 'dashed'
/// 'dotted'
///
public string type = "solid";
///
///
///
public int width = 1;
///
/// 刻度线的颜色
///
public string color = "#333";
//shadowBlur | number
//图形阴影的模糊大小。该属性配合 shadowColor, shadowOffsetX, shadowOffsetY 一起设置图形的阴影效果。
//示例:
//{
// shadowColor: 'rgba(0, 0, 0, 0.5)',
// shadowBlur: 10
//}
// shadowColor | Color
// 阴影颜色。支持的格式同color。
//shadowOffsetX | number
//[default: 0]
//阴影水平方向上的偏移距离。
//shadowOffsetY | number
//[default: 0]
//阴影垂直方向上的偏移距离。
//opacity | number
//图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。
}
public class EchartAxisPointer
{
///
///
///
public string type;
///
///
///
public EchartCrossStyle crossStyle;
///
/// 线条样式
///
public EchartLineStyle lineStyle;
}
public class EchartTooltip
{
///
///
///
public string trigger;
///
///
///
public EchartAxisPointer axisPointer;
}
public class EchartGrid
{
///
///
///
public string left = "5%";
///
///
///
public string right = "5%";
///
///
///
public string bottom = "5%";
///
///
///
public string top = "5%";
///
///
///
public bool containLabel = true;
}
public class EchartGrid2
{
///
///
///
public int left;
///
///
///
public int right;
///
///
///
public int bottom;
///
///
///
public int top;
///
///
///
public bool containLabel;
}
public class EchartAxisTick
{
///
///
///
public bool show = true;
}
public class EchartAxisLine
{
///
///
///
public bool show = true;
}
///
/// 坐标轴属性
///
public class EchartAxis
{
///
/// 坐标轴名称
///
public string name = "";
///
///
///
public string type = "category";
///
///
///
public bool boundaryGap = false;
///
///
///
public List data = new List();
///
/// 坐标轴偏移
///
public int offset = 5;
///
/// z坐标轴刻度线
///
public EchartSplitLine splitLine = new EchartSplitLine();
///
///
///
public EchartAxisTick axisTick = new EchartAxisTick();
///
/// 坐标轴线属性
///
public EchartAxisLine axisLine = new EchartAxisLine();
///
/// 横纵左边字体属性
///
public EchartAxisLabel axisLabel = new EchartAxisLabel();
}
public class EchartAxisLabel
{
///
///
///
public string color;
///
///
///
public EchartTextStyle textStyle;
public int fontSize = 20;
}
public class EchartSplitLine
{
///
///
///
public bool show = false;
///
///
///
public EchartLineStyle2 lineStyle;
}
public class EchartLineStyle2
{
///
///
///
public string color;
}
public class EchartSeriesItem
{
///
/// 客厅
///
public string name = "";
///
///
///
public string type = "line";
///
///
///
public bool smooth = true;
///
///
///
public List data;
/////
/////
/////
//public int symbolSize = 1;
///
/// none 去掉拐点
///
public string symbol = "none";
///
/// 线条样式
///
public EchartLineStyle lineStyle;
}
#endregion
}