mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-07-06 23:03:56 +00:00
3.0 - guage chart
This commit is contained in:
@@ -25,7 +25,6 @@ namespace XCharts.Editor
|
||||
#endif
|
||||
PropertyField(prop, "m_FontSize");
|
||||
PropertyField(prop, "m_TextColor");
|
||||
//PropertyField(prop, "m_TextBackgroundColor");
|
||||
DrawExtendeds(prop);
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
@@ -75,27 +74,6 @@ namespace XCharts.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
[CustomPropertyDrawer(typeof(GaugeAxisTheme), true)]
|
||||
public class GaugeAxisThemeDrawer : AxisThemeDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Gauge Axis"; } }
|
||||
public override List<string> IngorePropertys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<string> {
|
||||
"m_TextBackgroundColor" ,
|
||||
"m_LineLength",
|
||||
};
|
||||
}
|
||||
}
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_BarBackgroundColor");
|
||||
PropertyField(prop, "m_StageColor");
|
||||
}
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(DataZoomTheme), true)]
|
||||
public class DataZoomThemeDrawer : ComponentThemeDrawer
|
||||
@@ -133,8 +111,6 @@ namespace XCharts.Editor
|
||||
protected override void DrawExtendeds(SerializedProperty prop)
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_LineType");
|
||||
PropertyField(prop, "m_LineWidth");
|
||||
PropertyField(prop, "m_LineColor");
|
||||
|
||||
@@ -17,16 +17,14 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Position");
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_AutoOffset");
|
||||
PropertyField(prop, "m_Margin");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
PropertyField(prop, "m_NumericFormatter");
|
||||
PropertyField(prop, "m_BackgroundWidth");
|
||||
PropertyField(prop, "m_BackgroundHeight");
|
||||
PropertyField(prop, "m_PaddingLeftRight");
|
||||
PropertyField(prop, "m_PaddingTopBottom");
|
||||
PropertyField(prop, "m_Border");
|
||||
PropertyField(prop, "m_BorderWidth");
|
||||
PropertyField(prop, "m_BorderColor");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace XCharts.Editor
|
||||
{
|
||||
base.DrawExtendeds(prop);
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
[CustomPropertyDrawer(typeof(AxisTick), true)]
|
||||
@@ -55,6 +57,9 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Inside");
|
||||
PropertyField(prop, "m_ShowStartTick");
|
||||
PropertyField(prop, "m_ShowEndTick");
|
||||
PropertyField(prop, "m_SplitNumber");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_AutoColor");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ namespace XCharts.Editor
|
||||
PropertyField(prop, "m_Offset");
|
||||
PropertyField(prop, "m_ExtraWidth");
|
||||
PropertyField(prop, "m_Color");
|
||||
PropertyField(prop, "m_AutoBackgroundColor");
|
||||
PropertyField(prop, "m_BackgroundColor");
|
||||
PropertyField(prop, "m_FontSize");
|
||||
PropertyField(prop, "m_LineSpacing");
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace XCharts.Editor
|
||||
if (MakeComponentFoldout(prop, "m_Show"))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_OffsetCenter");
|
||||
PropertyField(prop, "m_TextStyle");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace XCharts.Editor
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Inside");
|
||||
PropertyField(prop, "m_Interval");
|
||||
PropertyField(prop, "m_Margin");
|
||||
PropertyField(prop, "m_Distance");
|
||||
PropertyField(prop, "m_Width");
|
||||
PropertyField(prop, "m_Height");
|
||||
PropertyField(prop, "m_Formatter");
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace XCharts.Editor
|
||||
PropertyField("m_RoundCap");
|
||||
PropertyField("m_Clockwise");
|
||||
|
||||
PropertyField("m_TitleStyle");
|
||||
PropertyField("m_ItemStyle");
|
||||
PropertyField("m_Animation");
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace XCharts.Editor
|
||||
});
|
||||
if (m_DataElementFoldout[index])
|
||||
{
|
||||
if(!(serie is ISimplifiedSerie))
|
||||
if (!(serie is ISimplifiedSerie))
|
||||
DrawSerieDataDetail(m_Datas, index);
|
||||
}
|
||||
}
|
||||
@@ -201,6 +201,7 @@ namespace XCharts.Editor
|
||||
var m_Symbol = serieData.FindPropertyRelative("m_Symbols");
|
||||
var m_LineStyle = serieData.FindPropertyRelative("m_LineStyles");
|
||||
var m_AreaStyle = serieData.FindPropertyRelative("m_AreaStyles");
|
||||
var m_TitleStyle = serieData.FindPropertyRelative("m_TitleStyles");
|
||||
|
||||
PropertyField(sereName);
|
||||
PropertyField(selected);
|
||||
@@ -239,6 +240,10 @@ namespace XCharts.Editor
|
||||
{
|
||||
serie.GetSerieData(index).GetOrAddComponent<AreaStyle>();
|
||||
}, m_AreaStyle.arraySize == 0),
|
||||
new HeaderMenuInfo("Add TitleStyle", () =>
|
||||
{
|
||||
serie.GetSerieData(index).GetOrAddComponent<TitleStyle>();
|
||||
}, m_TitleStyle.arraySize == 0),
|
||||
new HeaderMenuInfo("Remove ItemStyle", () =>
|
||||
{
|
||||
serie.GetSerieData(index).RemoveComponent<ItemStyle>();
|
||||
@@ -267,6 +272,10 @@ namespace XCharts.Editor
|
||||
{
|
||||
serie.GetSerieData(index).RemoveComponent<AreaStyle>();
|
||||
}, m_AreaStyle.arraySize > 0),
|
||||
new HeaderMenuInfo("Remove TitleStyle", () =>
|
||||
{
|
||||
serie.GetSerieData(index).RemoveComponent<TitleStyle>();
|
||||
}, m_TitleStyle.arraySize > 0),
|
||||
new HeaderMenuInfo("Remove All", () =>
|
||||
{
|
||||
serie.GetSerieData(index).RemoveAllComponent();
|
||||
@@ -287,6 +296,8 @@ namespace XCharts.Editor
|
||||
PropertyField(m_LineStyle.GetArrayElementAtIndex(0));
|
||||
if (m_AreaStyle.arraySize > 0)
|
||||
PropertyField(m_AreaStyle.GetArrayElementAtIndex(0));
|
||||
if (m_TitleStyle.arraySize > 0)
|
||||
PropertyField(m_TitleStyle.GetArrayElementAtIndex(0));
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user