增加TooltipAuto自动设置显示类型和触发类型

This commit is contained in:
monitor1394
2023-09-01 08:01:27 +08:00
parent 9deb120446
commit a6ba17ee00
33 changed files with 154 additions and 108 deletions

View File

@@ -11,13 +11,9 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
AddChartComponentWhenNoExist<XAxis>();
AddChartComponentWhenNoExist<YAxis>();
var tooltip = GetChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Line;
tooltip.trigger = Tooltip.Trigger.Axis;
EnsureChartComponent<GridCoord>();
EnsureChartComponent<XAxis>();
EnsureChartComponent<YAxis>();
RemoveData();
SimplifiedLine.AddDefaultSerie(this, GenerateDefaultSerieName());