Charts Showing Irregular Results in exported files from 3D

551
2
Jump to solution
10-22-2021 12:27 PM
by Anonymous User
Not applicable

Yet another post from me regarding charts.

This time I am experiencing strange chart results in scene layouts exported to pdf's.  It seems the chart's range display is tied to the pitch setting in the scene's extent.  I am developing an application in Pro 2.7 that uses a local scene.  The user is able to use the general navigation tools to alter the extent, pitch, roll, and heading.  

The application allows them to click a button to generate layouts and create exported pdfs.  The layouts use the 3D local scene as well as a chart that is associated with the feature class (Time Space Cube) that is displayed in the scene.   

I have encountered strange results with the chart in the exported pdf when certain 'pitch' values are present from the extent the user has interactively chosen with the native Pro navigation tools.  I am not sure if the other 3D navigation components (roll or heading) play a role, but have definitely seen the chart effect through the 'pitch' setting.

The resulting chart in the exported pdf does not show the correct range of values.  I understand when a chart is placed in a different sized container that it will automatically adjust the axes values to accommodate the size.  However, I am not changing the container size in the layout at anytime.  The 'altered' chart appears only when the extent of the scene it is related to is changed.

I have attached some screen shots of the pdfs that illustrate this.  The first image shows the chart being displayed correctly. The second image shows the misbehaving chart.  They were created from the same code.  The only thing different was the extent of  the scene prior to generating the layouts and subsequent pdfs.

 

Correct Chart 90 PitchCorrect Chart 90 PitchInCorrect Chart 45InCorrect Chart 45

Perhaps I have missed something regarding charts.  I have looked around a bit and did not find any discussions directed at chart appearance based on the extent of the scene that contains the feature class that the chart is connected to.

 Here is the code that inserts the chart into the layouts. The code produced the results described above.

 

foreach(var item in layd2.Charts)
{
  if(item.Name == strChartNameToUse)
  {
    CIMChart theUniversalChart = (CIMChart)item;
    CIMColor cimColor = CIMColor.CreateRGBColor(255, 0, 0, 100);
    theUniversalChart.GeneralProperties.TitleText.FontFillColor = cimColor;
    CIMChartGeneralProperties CIMUniversalChartProps = theUniversalChart.GeneralProperties;
    layd2.Charts[i] = theUniversalChart;
    SelectedCubeAnalysisLayer.SetDefinition(layd2);
    cfUniversal = LayoutElementFactory.Instance.CreateChartFrame(Layout, gf_env, mfElm, layd2AsMapMember, theUniversalChart.Name);

  }

}

Any assistance would be appreciated.

Cheers

 

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

This is my second effort at attempting to post  the solution for this.

After toiling a way looking for a property associated with the CIMChart that ties to scene and the space time cube, I found the correct object to manipulate was the CIMChartFrame.  It has a property titled "IsDynamic" that can be set to false to allow the chart to be displayed in the layout.

Not sure if the the chart/scene behavior is properly baked up with space time cubes.  I was revisiting the process manually in Pro and encountered the check box on the Chart Frame properties dialog labeled "Only show chart data visible in the map frame".  As expected, when I set this to false, the chart appeared.

To accomplish this in the sdk, I needed to work with the ChartFrame object. Essentially, get the definition of the chart frame and assign the "IsDynamic" property to false.  For the purposes of the application I am developing, this is the result I am after.

ChartFrame cfUniversal = LayoutElementFactory.Instance.CreateChartFrame(Layout,gf_env,mfElm,layd2AsMapMember, theUniversalChart.Name);
CIMElement ChartElement = cfUniversal.GetDefinition();
CIMChartFrame ChartFrame = (CIMChartFrame)ChartElement;
ChartFrame.IsDynamic = false;
cfUniversal.SetDefinition(ChartFrame);

 

View solution in original post

0 Kudos
2 Replies
by Anonymous User
Not applicable

I stand corrected regarding only the 'Pitch' of the scene creating the different chart.  The extent also impacts it.  Perhaps this is 'feature' that is how the chart properly operates. If so, it is not the behavior I am after within the application.

Additionally, the effect is seen in the layout version as well as the exported version.  Perhaps this is a valid feature that somehow  ties the chart to what is within the extent, though I have not closely reviewed that.

Anyway, if someone out there knows the mechanics of this, I would welcome being smartened up about how all this ties together.

Thanks

0 Kudos
by Anonymous User
Not applicable

This is my second effort at attempting to post  the solution for this.

After toiling a way looking for a property associated with the CIMChart that ties to scene and the space time cube, I found the correct object to manipulate was the CIMChartFrame.  It has a property titled "IsDynamic" that can be set to false to allow the chart to be displayed in the layout.

Not sure if the the chart/scene behavior is properly baked up with space time cubes.  I was revisiting the process manually in Pro and encountered the check box on the Chart Frame properties dialog labeled "Only show chart data visible in the map frame".  As expected, when I set this to false, the chart appeared.

To accomplish this in the sdk, I needed to work with the ChartFrame object. Essentially, get the definition of the chart frame and assign the "IsDynamic" property to false.  For the purposes of the application I am developing, this is the result I am after.

ChartFrame cfUniversal = LayoutElementFactory.Instance.CreateChartFrame(Layout,gf_env,mfElm,layd2AsMapMember, theUniversalChart.Name);
CIMElement ChartElement = cfUniversal.GetDefinition();
CIMChartFrame ChartFrame = (CIMChartFrame)ChartElement;
ChartFrame.IsDynamic = false;
cfUniversal.SetDefinition(ChartFrame);

 

0 Kudos