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 Pitch
InCorrect 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