mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 13:30:10 +00:00
增加Covert XY Axis互换XY轴配置
This commit is contained in:
@@ -153,6 +153,36 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
public AxisLabel Clone()
|
||||
{
|
||||
var axisLable = new AxisLabel();
|
||||
axisLable.show = show;
|
||||
axisLable.formatter = formatter;
|
||||
axisLable.interval = interval;
|
||||
axisLable.inside = inside;
|
||||
axisLable.rotate = rotate;
|
||||
axisLable.margin = margin;
|
||||
axisLable.color = color;
|
||||
axisLable.fontSize = fontSize;
|
||||
axisLable.forceENotation = forceENotation;
|
||||
axisLable.textLimit = textLimit.Clone();
|
||||
return axisLable;
|
||||
}
|
||||
|
||||
public void Copy(AxisLabel axisLable)
|
||||
{
|
||||
show = axisLable.show;
|
||||
formatter = axisLable.formatter;
|
||||
interval = axisLable.interval;
|
||||
inside = axisLable.inside;
|
||||
rotate = axisLable.rotate;
|
||||
margin = axisLable.margin;
|
||||
color = axisLable.color;
|
||||
fontSize = axisLable.fontSize;
|
||||
forceENotation = axisLable.forceENotation;
|
||||
textLimit.Copy(axisLable.textLimit);
|
||||
}
|
||||
|
||||
public void SetRelatedText(Text txt, float labelWidth)
|
||||
{
|
||||
m_TextLimit.SetRelatedText(txt, labelWidth);
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace XCharts
|
||||
public bool onZero
|
||||
{
|
||||
get { return m_OnZero; }
|
||||
set { if (PropertyUtility.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
|
||||
set { if (PropertyUtility.SetStruct(ref m_OnZero, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// line style line width.
|
||||
@@ -116,5 +116,31 @@ namespace XCharts
|
||||
return axisLine;
|
||||
}
|
||||
}
|
||||
|
||||
public AxisLine Clone()
|
||||
{
|
||||
var axisLine = new AxisLine();
|
||||
axisLine.show = show;
|
||||
axisLine.onZero = onZero;
|
||||
axisLine.width = width;
|
||||
axisLine.symbol = symbol;
|
||||
axisLine.symbolWidth = symbolWidth;
|
||||
axisLine.symbolHeight = symbolHeight;
|
||||
axisLine.symbolOffset = symbolOffset;
|
||||
axisLine.symbolDent = symbolDent;
|
||||
return axisLine;
|
||||
}
|
||||
|
||||
public void Copy(AxisLine axisLine)
|
||||
{
|
||||
show = axisLine.show;
|
||||
onZero = axisLine.onZero;
|
||||
width = axisLine.width;
|
||||
symbol = axisLine.symbol;
|
||||
symbolWidth = axisLine.symbolWidth;
|
||||
symbolHeight = axisLine.symbolHeight;
|
||||
symbolOffset = axisLine.symbolOffset;
|
||||
symbolDent = axisLine.symbolDent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,5 +125,31 @@ namespace XCharts
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public AxisName Clone()
|
||||
{
|
||||
var axisName = new AxisName();
|
||||
axisName.show = show;
|
||||
axisName.name = name;
|
||||
axisName.location = location;
|
||||
axisName.offset = offset;
|
||||
axisName.rotate = rotate;
|
||||
axisName.color = color;
|
||||
axisName.fontSize = fontSize;
|
||||
axisName.fontStyle = fontStyle;
|
||||
return axisName;
|
||||
}
|
||||
|
||||
public void Copy(AxisName axisName)
|
||||
{
|
||||
show = axisName.show;
|
||||
name = axisName.name;
|
||||
location = axisName.location;
|
||||
offset = axisName.offset;
|
||||
rotate = axisName.rotate;
|
||||
color = axisName.color;
|
||||
fontSize = axisName.fontSize;
|
||||
fontStyle = axisName.fontStyle;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,22 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
public AxisSplitArea Clone()
|
||||
{
|
||||
var axisSplitArea = new AxisSplitArea();
|
||||
axisSplitArea.show = show;
|
||||
axisSplitArea.color = new List<Color>();
|
||||
ChartHelper.CopyList(axisSplitArea.color, color);
|
||||
return axisSplitArea;
|
||||
}
|
||||
|
||||
public void Copy(AxisSplitArea splitArea)
|
||||
{
|
||||
show = splitArea.show;
|
||||
color.Clear();
|
||||
ChartHelper.CopyList(color, splitArea.color);
|
||||
}
|
||||
|
||||
public Color getColor(int index)
|
||||
{
|
||||
var i = index % color.Count;
|
||||
|
||||
@@ -61,6 +61,22 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
public AxisSplitLine Clone()
|
||||
{
|
||||
var axisSplitLine = new AxisSplitLine();
|
||||
axisSplitLine.show = show;
|
||||
axisSplitLine.interval = interval;
|
||||
axisSplitLine.lineStyle = lineStyle.Clone();
|
||||
return axisSplitLine;
|
||||
}
|
||||
|
||||
public void Copy(AxisSplitLine splitLine)
|
||||
{
|
||||
show = splitLine.show;
|
||||
interval = splitLine.interval;
|
||||
lineStyle.Copy(splitLine.lineStyle);
|
||||
}
|
||||
|
||||
internal Color GetColor(ThemeInfo theme)
|
||||
{
|
||||
if (lineStyle.color != Color.clear)
|
||||
|
||||
@@ -84,5 +84,25 @@ namespace XCharts
|
||||
return tick;
|
||||
}
|
||||
}
|
||||
|
||||
public AxisTick Clone()
|
||||
{
|
||||
var axisTick = new AxisTick();
|
||||
axisTick.show = show;
|
||||
axisTick.alignWithLabel = alignWithLabel;
|
||||
axisTick.inside = inside;
|
||||
axisTick.length = length;
|
||||
axisTick.width = width;
|
||||
return axisTick;
|
||||
}
|
||||
|
||||
public void Copy(AxisTick axisTick)
|
||||
{
|
||||
show = axisTick.show;
|
||||
alignWithLabel = axisTick.alignWithLabel;
|
||||
inside = axisTick.inside;
|
||||
length = axisTick.length;
|
||||
width = axisTick.width;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,6 @@ namespace XCharts
|
||||
|
||||
public LineStyle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LineStyle(float width)
|
||||
@@ -112,6 +111,26 @@ namespace XCharts
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
public LineStyle Clone()
|
||||
{
|
||||
var lineStyle = new LineStyle();
|
||||
lineStyle.show = show;
|
||||
lineStyle.type = type;
|
||||
lineStyle.color = color;
|
||||
lineStyle.width = width;
|
||||
lineStyle.opacity = opacity;
|
||||
return lineStyle;
|
||||
}
|
||||
|
||||
public void Copy(LineStyle lineStyle)
|
||||
{
|
||||
show = lineStyle.show;
|
||||
type = lineStyle.type;
|
||||
color = lineStyle.color;
|
||||
width = lineStyle.width;
|
||||
opacity = lineStyle.opacity;
|
||||
}
|
||||
|
||||
public Color GetColor()
|
||||
{
|
||||
var color = m_Color;
|
||||
|
||||
@@ -60,6 +60,24 @@ namespace XCharts
|
||||
private TextGenerationSettings m_RelatedTextSettings;
|
||||
private float m_RelatedTextWidth = 0;
|
||||
|
||||
public TextLimit Clone()
|
||||
{
|
||||
var textLimit = new TextLimit();
|
||||
textLimit.enable = enable;
|
||||
textLimit.maxWidth = maxWidth;
|
||||
textLimit.gap = gap;
|
||||
textLimit.suffix = suffix;
|
||||
return textLimit;
|
||||
}
|
||||
|
||||
public void Copy(TextLimit textLimit)
|
||||
{
|
||||
enable = textLimit.enable;
|
||||
maxWidth = textLimit.maxWidth;
|
||||
gap = textLimit.gap;
|
||||
suffix = textLimit.suffix;
|
||||
}
|
||||
|
||||
public void SetRelatedText(Text txt, float labelWidth)
|
||||
{
|
||||
m_RelatedText = txt;
|
||||
|
||||
Reference in New Issue
Block a user