GraphClusterRule
ChartForgeX.Interactivity
Describes one structural or host-defined clustering step. Rules run in list order when the scene is rendered, after declared clusters, and each rule only takes nodes that no earlier cluster already holds.
Inheritance
- object
- GraphClusterRule
Usage
Explore 21 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 11
- Property GraphClusterOptions.Rules
- Extension method GraphClusterRule.Collapsed
- Extension method GraphClusterRule.Kind
- Extension method GraphClusterRule.Label
- Method GraphClusterRule.Connections
- Method GraphClusterRule.Hubs
- Method GraphClusterRule.Outliers
- Method GraphClusterRule.Where
- Method GraphClusterRuleFluent.Collapsed
- Method GraphClusterRuleFluent.Kind
- Method GraphClusterRuleFluent.Label
Accepted by parameters 10
- Extension method GraphClusterOptions.Rule
- Extension method GraphClusterOptions.Rules
- Method GraphClusterOptionsFluent.Rule
- Method GraphClusterOptionsFluent.Rules
- Extension method GraphClusterRule.Collapsed
- Extension method GraphClusterRule.Kind
- Extension method GraphClusterRule.Label
- Method GraphClusterRuleFluent.Collapsed
- Method GraphClusterRuleFluent.Kind
- Method GraphClusterRuleFluent.Label
Methods
public static GraphClusterRule Connections(string nodeId, Func<GraphSceneNode, bool>? neighbourFilter = null, string idPrefix = "connection") #Creates a rule that clusters one node with its not yet clustered neighbours.
Parameters
- nodeId string
- The node to start from.
- neighbourFilter System.Func<ChartForgeX.Interactivity.GraphSceneNode, bool>? = null
- Optional test a neighbour must pass to join.
- idPrefix string = "connection"
- The cluster id prefix.
Returns
GraphClusterRulepublic static GraphClusterRule Hubs(int minimumConnections = 3, Func<GraphSceneNode, bool>? neighbourFilter = null, string idPrefix = "hub") #Creates a rule that clusters each node with at least minimumConnections distinct neighbours together with those neighbours. Hubs are taken from the most connected down, ties by id.
Parameters
- minimumConnections int = 3
- The connection count that makes a node a hub. Must be at least two.
- neighbourFilter System.Func<ChartForgeX.Interactivity.GraphSceneNode, bool>? = null
- Optional test a neighbour must pass to join its hub.
- idPrefix string = "hub"
- The cluster id prefix.
Returns
GraphClusterRulepublic static GraphClusterRule Outliers(Func<GraphSceneNode, bool>? leafFilter = null, string idPrefix = "outliers") #Creates a rule that clusters leaf nodes (exactly one distinct neighbour) with that neighbour, one cluster per neighbour.
Parameters
- leafFilter System.Func<ChartForgeX.Interactivity.GraphSceneNode, bool>? = null
- Optional test a leaf must pass to join.
- idPrefix string = "outliers"
- The cluster id prefix.
Returns
GraphClusterRulepublic static GraphClusterRule Where(string id, string label, Func<GraphSceneNode, bool> predicate) #Creates a rule that groups every not yet clustered node the predicate accepts into one cluster. The predicate runs in .NET while the page is built, so the result is part of the static document.
Parameters
- id string
- The stable cluster id.
- label string
- The cluster label.
- predicate System.Func<ChartForgeX.Interactivity.GraphSceneNode, bool>
- The membership test.
Returns
GraphClusterRuleInherited Methods
Properties
public string Id { get; } #Gets the rule id. Predicate rules use it as the cluster id; hub, outlier and connection rules use it as the prefix of ids such as hub-dc01, so the same graph always produces the same cluster ids.
public int MinimumConnections { get; } #Gets the connection count a node needs to become a hub. Only used by GraphClusterRuleKind.Hubs.
public string? NodeId { get; private set; } #Gets the node id a connection rule starts from. Only used by GraphClusterRuleKind.Connections.
public Func<GraphSceneNode, bool>? Predicate { get; } #Gets the node test. Predicate rules use it for membership; the structural rules use it, when set, to decide which neighbours may join (the hub, anchor or start node itself always joins).
public string? Label { get; set; } #Gets or sets the cluster label. Predicate rules default to the rule id; structural rules default to the hub, anchor or start node label.
public string? Kind { get; set; } #Gets or sets the cluster kind written to the produced clusters. Defaults to hub, outlier, connection or group.
public bool Collapsed { get; set; } #Gets or sets whether the produced clusters start collapsed.
Extension Methods
public static GraphClusterRule Collapsed(GraphClusterRule graphClusterRule, bool value = true) #Sets GraphClusterRule.Collapsed: Gets or sets whether the produced clusters start collapsed.
Parameters
- graphClusterRule ChartForgeX.Interactivity.GraphClusterRule
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
graphClusterRule.Collapsed = value; graphClusterRule.Collapsed(value);public static GraphClusterRule Kind(GraphClusterRule graphClusterRule, string? value) #Sets GraphClusterRule.Kind: Gets or sets the cluster kind written to the produced clusters. Defaults to hub, outlier, connection or group.
Parameters
- graphClusterRule ChartForgeX.Interactivity.GraphClusterRule
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
graphClusterRule.Kind = value; graphClusterRule.Kind(value);public static GraphClusterRule Label(GraphClusterRule graphClusterRule, string? value) #Sets GraphClusterRule.Label: Gets or sets the cluster label. Predicate rules default to the rule id; structural rules default to the hub, anchor or start node label.
Parameters
- graphClusterRule ChartForgeX.Interactivity.GraphClusterRule
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
graphClusterRule.Label = value; graphClusterRule.Label(value);