IsLinkChart Property (Map)
Gets whether the map is of type Link Chart.
public bool IsLinkChart {get;}
Public ReadOnly Property IsLinkChart As Boolean
Does Active MapView contain a link chart map
var mv = MapView.Active;
// check the view
var isLinkChartView = mv.IsLinkChartView;
// or alternatively get the map and check that
var map = MapView.Active.Map;
// check the MapType to determine if it's a link chart map
var isLinkChart = map.MapType == MapType.LinkChart;
// or you could use the following
// var isLinkChart = map.IsLinkChart;
Get and set the link chart layout
var mv = MapView.Active;
// a MapView can encapsulate a link chart IF it's map
// is of type MapType.LinkChart
var map = mv.Map;
var isLinkChart = map.MapType == MapType.LinkChart;
// or use the following
// var isLinkChart = map.IsLinkChart;
QueuedTask.Run(() =>
{
if (isLinkChart)
{
// get the layout algorithm
var layoutAlgorithm = mv.GetLinkChartLayout();
// toggle the value
if (layoutAlgorithm == KnowledgeLinkChartLayoutAlgorithm.Geographic_Organic_Standard)
layoutAlgorithm = KnowledgeLinkChartLayoutAlgorithm.Organic_Standard;
else
layoutAlgorithm = KnowledgeLinkChartLayoutAlgorithm.Geographic_Organic_Standard;
// set it
mv.SetLinkChartLayoutAsync(layoutAlgorithm);
// OR set it and force a redraw / update
// await mv.SetLinkChartLayoutAsync(layoutAlgorithm, true);
}
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.3 or higher.