Hi Everyone,
I'm having issues with some of the controls after migrating to a newest version of Infragistics controls.
At the moment I have an issue with UltraChart control.
When I change orientation in the Axis of X2 for my char: Orientation="Custom" OrientationAngle="45" labels are not aligned properly (please look at screnshot attached). On the lef-hand side is actual view, and on the right a previous one.
Plase can anyone knows how to fix this issue?
Many thanks for your help.
Kindest regards,
Lukasz
It looks like chart.Axis.X2.Labels.VerticalAlign is set to Center instead of Far. Try setting it to Far and that should fix the problem.
Thanks for the reply.
Unfortunatelly it is already set to 'Far'.
I've also tried to set the <Margin> for Axis to a different value but this is not working as well.
Maybe there is some Property to set the Margin for the whole Chart?
P.S. Oh... and I've forgot to mention that this happens only when the 'Orientation' is set to Custom, when it's set to: 'VerticalLeftFacing' it's working fine. It looks like control can't calculate the size or location for the label.
You can try changing axis.Labels.Layout.Behavior to None. Maybe try setting the Padding property under the Layout property. Otherwise, it's pretty hard to guess without seeing a code snippet.What version did you upgrade to? Can you paste the code you used for the X2 axis?
Please find the attached code below:
"*.aspx" file:
<X2 Extent="80" LineColor="#000000" LineDrawStyle="Solid" LineEndCapStyle="NoAnchor" LineThickness="2" LogBase="10" NumericAxisType="Linear" RangeMax="0" RangeMin="0" RangeType="Automatic" TickmarkInterval="10" TickmarkPercentage="10" TickmarkStyle="Percentage" Visible="True"> <Labels Flip="False" FontColor="#FF0000" ItemFormat="DataValue" Orientation="Custom" OrientationAngle="45" Visible="True" HorizontalAlign="Far" VerticalAlign="Far"> <SeriesLabels Flip="False" FontColor="#000000" Orientation="Horizontal" OrientationAngle="0" Visible="True" HorizontalAlign="Near" VerticalAlign="Far"> </SeriesLabels> </Labels> <MajorGridLines AlphaLevel="255" Color="#DCDCDC" DrawStyle="Dot" Thickness="1" Visible="True"> </MajorGridLines> <Margin> <Far MarginType="Percentage" Value="0"> </Far> <Near MarginType="Percentage" Value="0"> </Near> </Margin> <MinorGridLines AlphaLevel="255" Color="#D3D3D3" DrawStyle="Dot" Thickness="1" Visible="False"> </MinorGridLines> <ScrollScale Height="10" Scale="1" Scroll="0" Visible="False" Width="15"> </ScrollScale> <StripLines Interval="2" Visible="False"> <PE ElementType="SolidFill" Fill="#FFFFFF" FillGradientStyle="None" FillOpacity="255" FillStopColor="#FFFFFF" FillStopOpacity="255" Hatch="None" ImageFitStyle="StretchedFit" ImagePath="" ImageWrapMode="Tile" Stroke="#000000" StrokeOpacity="255" StrokeWidth="1" Texture="LightGrain" TextureApplication="Normal"> </PE> </StripLines> <TimeAxisStyle TimeAxisStyle="Continuous"> </TimeAxisStyle> </X2>
"*.aspx.cs" file:
private void m_chart_8_LoadData() {
...
m_chart_8.Axis.X2.Labels.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, (System.Drawing.FontStyle.Regular | System.Drawing.FontStyle.Bold), System.Drawing.GraphicsUnit.Point); m_chart_8.Axis.X2.Labels.SeriesLabels.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); m_chart_8.AxisX2SeriesLabelsFormat = "SeriesLabel"; m_chart_8.AxisX2PaintElementImage = "";
Hope this will help you to understand the problem.
This is a bug, and it's already fixed. The fix will be included in the next available hotfix. Until this you could try using:
this.UltraChart1.Axis.X2.Labels.Layout.Padding = -10;
This works fine for now and after applying the Hot Fix I'll get back to previous version.