This is a migrated thread and some comments may be shown as answers.

Chart Positioning Not Correct After Upgrading to New ASP.NET AJAX Version

5 Answers 110 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
DezTech
Top achievements
Rank 1
DezTech asked on 14 Jul 2008, 06:29 PM
After upgrading to the new ASP.NET Ajax version of RadChart, my chart's PlotArea no longer positions itself correctly according to the Position-X and Position-Y values I had previously set.  Changing these values seems to do absolutely nothing.  Is this a bug or perhaps there's a no property setting that is overriding my X/Y offset values.

Click this link to see a screenshot of what I mean.  The PlotArea used to be more to the bottom-right, using Position-X="60" and Position-Y="70", but now it's way to the top-left and the title overlaps it.

Screenshot of PlotArea Layout Problems

And here's my code...
-Aaron

<

telerik:RadChart ID="chartReport" runat="server" TempImagesFolder="~/RadControls/Temp" SeriesPalette="">

<charttitle>

<appearance dimensions-margins="2%, 2%, 2%, 2%">

<fillstyle maincolor="">

</fillstyle>

</appearance>

<textblock Text="">

<appearance textproperties-color="102, 137, 186">

</appearance>

</textblock>

</charttitle>

<series>

<telerik:ChartSeries Name="Series1" YAxisType="Primary" DataYColumn="DataValue1" />

<telerik:ChartSeries Name="Series2" YAxisType="Primary" DataYColumn="DataValue2" />

</series>

<appearance border-color="103, 136, 190">

<fillstyle maincolor="249, 250, 251">

</fillstyle>

</appearance>

<PlotArea SeriesOrientation="Vertical" intelligentlabelsenabled="True">

<DataTable visible="True">

<Appearance RenderType="PlotAreaRelative" TextVerticalAlign="Middle" TextHorizontalAlign="Center"></Appearance>

</DataTable>

<emptyseriesmessage>

<textblock text="No records to display.">

</textblock>

</emptyseriesmessage>

<XAxis LayoutMode="Between" VisibleValues="All" autoscale="False" datalabelscolumn="DataField" maxvalue="0" minvalue="0" step="1">

<appearance color="165, 190, 223" majortick-color="165, 190, 223" labelappearance-position-auto="False" labelappearance-position-x="0"

labelappearance-position-y="10" labelappearance-rotationangle="30" labelappearance-visible="False" majortick-visible="False">

<majorgridlines color="165, 190, 223" />

</appearance>

</XAxis>

<YAxis AxisMode="Normal" VisibleValues="All">

<ScaleBreaks LineStyle="Sinusoid"></ScaleBreaks>

<appearance color="165, 190, 223" majortick-color="165, 190, 223" minortick-color="165, 190, 223">

<majorgridlines color="165, 190, 223" />

<minorgridlines color="165, 190, 223" visible="False" />

<textappearance textproperties-color="Black">

</textappearance>

</appearance>

</YAxis>

<YAxis2 AxisMode="Normal" VisibleValues="All">

<ScaleBreaks LineStyle="Sinusoid"></ScaleBreaks>

</YAxis2>

<appearance Position-Auto="false" Position-X="70" Position-Y="60" seriespalette="" border-color="165, 190, 223" dimensions-margins="2%, 2%, 2%, 2%" dimensions-autosize="False">

<fillstyle filltype="Solid" maincolor="249, 250, 251">

</fillstyle>

</appearance>

</PlotArea>

<legend visible="False">

<appearance border-color="165, 190, 223" visible="False">

<fillstyle maincolor="231, 241, 255">

</fillstyle>

</appearance>

</legend>

</telerik:RadChart>

5 Answers, 1 is accepted

Sort by
0
DezTech
Top achievements
Rank 1
answered on 16 Jul 2008, 05:48 PM
My declarative positioning values are being reset to another set of values between the chart's PreRender and PrePaint events - X=18 & Y=10.  If I set them again there to 60 & 70 like I do declaratively, then that does alter their on-screen positioning.

So again, this seems like some sort of bug with the new version, or at least a very different way of positioning that maybe my code is not compatible with, but I'd expect my declarative positioning values to remain intact and be used.

Telerik, where are you guys on this thread???
-Aaron
0
DezTech
Top achievements
Rank 1
answered on 16 Jul 2008, 06:41 PM
Even updating the position values programmatically in the PrePaint method does not work completely.  I can move the DataTable just fine, but moving the PlotArea only moves part of the bar chart.  The Axises and secondary Y axis Chart Lines are not moved and I don't believe they have their own public .Appearance.Position properties.

I've also tried declaratively and programatically setting the margins/paddings values on the Chart and PlotArea and that doesn't seem to move the chart contents at all.

It looks like I'll need to look into downgrading back to the pre-Prometheus version of the RadChart control.  The reason I was updating to the Prometheus version was due to the Namespace issues when using the Prometheus controls and old RadChart in the same project, but I believe there's a way to keep the old RadChart working.  Very disappointed so far...

-Aaron
0
Ves
Telerik team
answered on 17 Jul 2008, 11:38 AM
Hi Aaron,

It seems you have hit a bug in RadChart - the PlotArea margins are not taken into account when DataTable is shown. I will notify our developers of it, so the will investigate it. For the time being, please calculate the plot area dimensions and set them manually, here is an example:

<Appearance Border-Color="165, 190, 223" Dimensions-Margins="40px, 1px, 1px, 70px" Dimensions-AutoSize="False" Dimensions-Height="200px" Dimensions-Width="310px"
    <FillStyle FillType="Solid" MainColor="249, 250, 251"
    </FillStyle> 
</Appearance> 

Here, 40px stands for 40 pixels top margin and 70px stands for 70 pixels right margin. You will need to provide the Height and Width for the plot are and they will depend on the chart size and the desired space.

I have attached a page with a chart using these settings. Still, you may need to adjust them as it seems your chart does not use the default width and height. Hope this helps.

Best Regards,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
DezTech
Top achievements
Rank 1
answered on 07 Aug 2008, 09:13 PM
Are you able to confirm that this bug has been corrected in the new 2008 Q2 release?  If so, I'll try to upgrade again...

Thanks,
-Aaron
0
Ves
Telerik team
answered on 08 Aug 2008, 07:21 AM
Hi Aaron,

I am afraid the fix for this did not make it for the Q2 release. I will ask our developers to make sure it is included in the service pack, which is expected within 3 weeks.

Best regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
DezTech
Top achievements
Rank 1
Answers by
DezTech
Top achievements
Rank 1
Ves
Telerik team
Share this question
or