Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveCharts Tooltip Update #13776

Merged
merged 22 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## In Depth

Basic Line creates a line chart with one or multiple labeled and color-coded lines plotted along a series of points. The number of string values in the list entered in the labels input determines the number of lines in the chart, along with their corresponding labels.
Index-Value Line Plot creates a line chart with one or multiple labeled and color-coded lines plotted along a series of points. The number of string values in the list entered in the labels input determines the number of lines in the chart, along with their corresponding labels.

A list of double value lists entered into the values input determines the position of each point along the line(s). Assign a color for each line by entering a list of color values into the colors input.
___
Expand Down
19 changes: 10 additions & 9 deletions src/Libraries/CoreNodeModelsWpf/Charts/BarChartNodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ namespace CoreNodeModelsWpf.Charts
[NodeCategory("Display.Charts.Create")]
[NodeDescription("ChartsBarChartDescription", typeof(CoreNodeModelWpfResources))]
[NodeSearchTags("ChartsBarChartSearchTags", typeof(CoreNodeModelWpfResources))]

[InPortNames("labels", "values", "colors")]
[InPortTypes("List<string>", "List<var>", "List<color>")]
[OutPortTypes("Dictionary<Label, Value>")]
[InPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsBarChartLabelsDataPortToolTip",
"ChartsBarChartValuesDataPortToolTip",
"ChartsBarChartColorsDataPortToolTip")]
[OutPortNames("labels:values")]
[OutPortTypes("Dictionary<string, double>")]
[OutPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsBarChartLabelsValuesDataPortToolTip")]
[AlsoKnownAs("CoreNodeModelsWpf.Charts.BarChart")]
public class BarChartNodeModel : NodeModel
{
Expand Down Expand Up @@ -58,23 +65,17 @@ public class BarChartNodeModel : NodeModel
/// </summary>
public BarChartNodeModel()
{
InPorts.Add(new PortModel(PortType.Input, this, new PortData("labels", "A list of labels for the bar chart categories.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("values", "A list (of lists) to supply values for the bars in each category.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("colors", "A list of colors for each bar chart category.")));

OutPorts.Add(new PortModel(PortType.Output, this, new PortData("labels:values", "Dictionary containing label:value key-pairs")));

RegisterAllPorts();

PortDisconnected += BarChartNodeModel_PortDisconnected;

ArgumentLacing = LacingStrategy.Disabled;
}

[JsonConstructor]
/// <summary>
/// Instantiate a new NodeModel instance.
/// </summary>
[JsonConstructor]
public BarChartNodeModel(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts) : base(inPorts, outPorts)
{
PortDisconnected += BarChartNodeModel_PortDisconnected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ namespace CoreNodeModelsWpf.Charts
[NodeCategory("Display.Charts.Create")]
[NodeDescription("ChartsBasicLineChartDescription", typeof(CoreNodeModelWpfResources))]
[NodeSearchTags("ChartsBasicLineChartSearchTags", typeof(CoreNodeModelWpfResources))]

[InPortNames("labels", "values", "colors")]
[InPortTypes("List<string>", "List<List<double>>", "List<color>")]
[InPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsBasicLineChartLabelsDataPortToolTip",
"ChartsBasicLineChartValuesDataPortToolTip",
"ChartsBasicLineChartColorsDataPortToolTip")]
[OutPortNames("labels:values")]
[OutPortTypes("Dictionary<string, double>")]
[OutPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsBasicLineChartLabelsValuesDataPortToolTip")]
[AlsoKnownAs("CoreNodeModelsWpf.Charts.Index-ValueLinePlot")]
public class BasicLineChartNodeModel : NodeModel
{
Expand Down Expand Up @@ -56,12 +63,6 @@ public class BasicLineChartNodeModel : NodeModel
/// </summary>
public BasicLineChartNodeModel()
{
InPorts.Add(new PortModel(PortType.Input, this, new PortData("labels", "A list of string labels for each line to be plotted.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("values", "List of lists each containing double values to be plotted against X-Axis values.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("colors", "A list of colors for each line.")));

OutPorts.Add(new PortModel(PortType.Output, this, new PortData("labels:values", "Dictionary containing label:value key-pairs")));

RegisterAllPorts();

PortDisconnected += BasicLineChartNodeModel_PortDisconnected;
Expand Down
19 changes: 10 additions & 9 deletions src/Libraries/CoreNodeModelsWpf/Charts/HeatSeriesNodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ namespace CoreNodeModelsWpf.Charts
[NodeCategory("Display.Charts.Create")]
[NodeDescription("ChartsHeatSeriesDescription", typeof(CoreNodeModelWpfResources))]
[NodeSearchTags("ChartsHeatSeriesSearchTags", typeof(CoreNodeModelWpfResources))]

[InPortNames("x-labels", "y-labels", "values", "colors")]
[InPortTypes("List<string>", "List<string>", "List<List<double>>", "List<color>")]
[OutPortTypes("object[]")]
[InPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsHeatSeriesXLabelsDataPortToolTip",
"ChartsHeatSeriesYLabelsDataPortToolTip",
"ChartsHeatSeriesValuesDataPortToolTip",
"ChartsHeatSeriesColorsDataPortToolTip")]
[OutPortNames("labels:values")]
[OutPortTypes("Dictionary<string, List<double>>")]
[OutPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsHeatSeriesLabelsValuesDataPortToolTip")]
[AlsoKnownAs("CoreNodeModelsWpf.Charts.HeatSeriesPlot")]
public class HeatSeriesNodeModel : NodeModel
{
Expand Down Expand Up @@ -62,13 +70,6 @@ public class HeatSeriesNodeModel : NodeModel
/// </summary>
public HeatSeriesNodeModel()
{
InPorts.Add(new PortModel(PortType.Input, this, new PortData("x-labels", "A list of string labels for the x-axis.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("y-labels", "A list of string labels for the y-axis.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("values", "A list of lists each containing double values representing items in a column.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("colors", "A list of colors used to generate a color range.")));

OutPorts.Add(new PortModel(PortType.Output, this, new PortData("labels:values", "Dictionary containing label:value key-pairs")));

RegisterAllPorts();

PortDisconnected += XYLineChartNodeModel_PortDisconnected;
Expand Down
17 changes: 9 additions & 8 deletions src/Libraries/CoreNodeModelsWpf/Charts/PieChartNodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ namespace CoreNodeModelsWpf.Charts
[NodeCategory("Display.Charts.Create")]
[NodeDescription("ChartsPieChartDescription", typeof(CoreNodeModelWpfResources))]
[NodeSearchTags("ChartsPieChartSearchTags", typeof(CoreNodeModelWpfResources))]

[InPortNames("labels", "values", "colors")]
[InPortTypes("List<string>", "List<double>", "List<color>")]
[OutPortTypes("Dictionary<Label, Value>")]
[InPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsPieChartLabelsDataPortToolTip",
"ChartsPieChartValuesDataPortToolTip",
"ChartsPieChartColorsDataPortToolTip")]
[OutPortNames("labels:values")]
[OutPortTypes("Dictionary<string, double>")]
[OutPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsPieChartLabelsValuesDataPortToolTip")]
[AlsoKnownAs("CoreNodeModelsWpf.Charts.PieChart")]
public class PieChartNodeModel : NodeModel
{
Expand Down Expand Up @@ -57,12 +64,6 @@ public class PieChartNodeModel : NodeModel
/// </summary>
public PieChartNodeModel()
{
InPorts.Add(new PortModel(PortType.Input, this, new PortData("labels", "A list of string labels for each segment in the pie chart.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("values", "A list of double values to supply a value for each segment of the pie chart.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("colors", "A list of colors for each segment of the pie chart.")));

OutPorts.Add(new PortModel(PortType.Output, this, new PortData("labels:values", "Dictionary containing label:value key-pairs")));

RegisterAllPorts();

PortDisconnected += PieChartNodeModel_PortDisconnected;
Expand Down
17 changes: 9 additions & 8 deletions src/Libraries/CoreNodeModelsWpf/Charts/ScatterPlotNodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,17 @@ namespace CoreNodeModelsWpf.Charts
[NodeCategory("Display.Charts.Create")]
[NodeDescription("ChartsScatterPlotDescription", typeof(CoreNodeModelWpfResources))]
[NodeSearchTags("ChartsScatterPlotSearchTags", typeof(CoreNodeModelWpfResources))]

[InPortNames("labels", "x-labels", "y-labels", "colors")]
[InPortTypes("List<string>", "List<List<double>>", "List<List<double>>", "List<color>")]
[InPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsScatterPlotLabelsDataPortToolTip",
"ChartsScatterPlotXLabelsDataPortToolTip",
"ChartsScatterPlotYLabelsDataPortToolTip",
"ChartsScatterPlotColorsDataPortToolTip")]
[OutPortNames("labels:values")]
[OutPortTypes("Dictionary<string, double>")]
[OutPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsScatterPlotLabelsValuesDataPortToolTip")]
[AlsoKnownAs("CoreNodeModelsWpf.Charts.ScatterPlot")]
public class ScatterPlotNodeModel : NodeModel
{
Expand Down Expand Up @@ -63,13 +71,6 @@ public class ScatterPlotNodeModel : NodeModel
/// </summary>
public ScatterPlotNodeModel()
{
InPorts.Add(new PortModel(PortType.Input, this, new PortData("labels", "A list of string labels for each group of points to be plotted.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("x-values", "A list of lists each containing double values representing x-coordinates.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("y-values", "A list of lists each containing double values representing y-coordinates.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("colors", "A list of colors for each group of points.")));

OutPorts.Add(new PortModel(PortType.Output, this, new PortData("labels:values", "Dictionary containing label:value key-pairs")));

RegisterAllPorts();

PortDisconnected += ScatterPlotNodeModel_PortDisconnected;
Expand Down
17 changes: 9 additions & 8 deletions src/Libraries/CoreNodeModelsWpf/Charts/XYLineChartNodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@ namespace CoreNodeModelsWpf.Charts
[NodeCategory("Display.Charts.Create")]
[NodeDescription("ChartsXYLineChartDescription", typeof(CoreNodeModelWpfResources))]
[NodeSearchTags("ChartsXYLineChartSearchTags", typeof(CoreNodeModelWpfResources))]

[InPortNames("labels", "x-labels", "y-labels", "colors")]
[InPortTypes("List<string>", "List<List<double>>", "List<List<double>>", "List<color>")]
[InPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsXYLineChartLabelsDataPortToolTip",
"ChartsXYLineChartXLabelsDataPortToolTip",
"ChartsXYLineChartYLabelsDataPortToolTip",
"ChartsXYLineChartColorsDataPortToolTip")]
[OutPortNames("labels:values")]
[OutPortTypes("Dictionary<string, double>")]
[OutPortDescriptions(typeof(CoreNodeModelWpfResources),
"ChartsXYLineChartLabelsValuesDataPortToolTip")]
[AlsoKnownAs("CoreNodeModelsWpf.Charts.XYLinePlot")]
public class XYLineChartNodeModel : NodeModel
{
Expand Down Expand Up @@ -62,13 +70,6 @@ public class XYLineChartNodeModel : NodeModel
/// </summary>
public XYLineChartNodeModel()
{
InPorts.Add(new PortModel(PortType.Input, this, new PortData("labels", "A list of string labels for each line to be plotted")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("x-values", "A list of lists each containing double values representing x-coordinates for each point in a line.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("y-values", "A list of lists each containing double values representing y-coordinates for each point in a line.")));
InPorts.Add(new PortModel(PortType.Input, this, new PortData("colors", "A list of colors for each line in the line plot.")));

OutPorts.Add(new PortModel(PortType.Output, this, new PortData("labels:values", "Dictionary containing label:value key-pairs")));

RegisterAllPorts();

PortDisconnected += XYLineChartNodeModel_PortDisconnected;
Expand Down
Loading