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

Problem with In-Code-Export

5 Answers 109 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Felix
Top achievements
Rank 1
Felix asked on 27 Sep 2012, 06:29 AM
I create an RadChart in the code and i want to export it to a file "png".
I disabled animations!

Now the point is in PieSeriesDefinition & LineSeriesDefinition this is correctly working, but in the BarSeriesDefinition & StackedBarDefinition is painting everything except of the bars!

See screenshots..

Any clue why this could occur? I think the BarSeries has some additional Animations?


5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 01 Oct 2012, 07:43 AM
Hello Felix,

Indeed currently there is a problem with the print/export bar series type in this scenario and you will need to apply this custom bar style manually, which explicitly sets the Opacity to 1:
<Style x:Key="PrintStyle" TargetType="telerik:Bar">
    <Setter Property="Template" >
        <Setter.Value>
            <ControlTemplate TargetType="telerik:Bar">
                <Canvas Opacity="1" x:Name="PART_MainContainer">
                    <Rectangle x:Name="PART_DefiningGeometry"                                  
                                Height="{TemplateBinding ItemActualHeight}"
                                Width="{TemplateBinding ItemActualWidth}"
                                Style="{TemplateBinding ItemStyle}"
                                RadiusX="{StaticResource BarRadiusX}"
                                RadiusY="{StaticResource BarRadiusY}" />
                    <Rectangle Height="{TemplateBinding ItemActualHeight}"
                                Width="{TemplateBinding ItemActualWidth}"
                                RadiusX="{StaticResource BarMaskRadius}"
                                RadiusY="{StaticResource BarMaskRadius}"
                                OpacityMask="{StaticResource BarOpacityMaskBrush}"
                                Fill="{StaticResource BarMaskBrush}"
                                Stroke="{StaticResource BarMaskStroke}"
                                StrokeThickness="{StaticResource BarMaskStrokeThickness}" />
                    <Rectangle x:Name="PART_SelectedState"
                                Height="{TemplateBinding ItemActualHeight}"
                                Width="{TemplateBinding ItemActualWidth}"
                                RadiusX="{StaticResource BarRadiusX}"
                                RadiusY="{StaticResource BarRadiusY}"
                                Fill="{StaticResource BarTopMaskBrush}" />
                </Canvas>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Hope this helps.

Kind regards,
Nikolay
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Felix
Top achievements
Rank 1
answered on 01 Oct 2012, 01:24 PM
Sounds promising, where do i get the missing static resources?
0
Nikolay
Telerik team
answered on 04 Oct 2012, 07:14 AM
Hello Felix,

You only need to apply the aforementioned style to the bar series. Please, find attached a sample application demonstrating this.

Greetings,
Nikolay
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Felix
Top achievements
Rank 1
answered on 05 Oct 2012, 07:22 AM
Hello Nikolay,

It works! Thanks! This will be fixed in the next release?


Kind regards
Felix
0
Nikolay
Telerik team
answered on 09 Oct 2012, 08:37 AM
Hi Felix,

Our developers are aware of this issue, however, we cannot commit to a concrete time frame for the implementation of the fix and for the time being we would recommend using the available workaround.

We would also highly recommend our new ChartView control for scenarios as this one, as it addresses some of the shortcomings of RadChart and has other various improvements.

Kind regards,
Nikolay
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Felix
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Felix
Top achievements
Rank 1
Share this question
or