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

Custom image as PointMark

3 Answers 70 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Erik ter Beeke
Top achievements
Rank 1
Erik ter Beeke asked on 21 Apr 2010, 04:58 PM
Hi there,

I am using the RadChart control in the context of a SharePoint 2010 site. I have a requirement to show a triangle at each point of a line series.
Since I didn't find a triangle in the default figures for the RadChart, I'm trying to display a custom image at each point.
I have tried this in a stand-alone ASP.NET web application and it works. I'm now trying to do the same in SharePoint, but I can't figure out how to specify the image url.

My current code looks like this:

<telerik:ChartSeries Name="My Series" Type="Line" ActiveRegionToolTip="#Y">
    <Appearance ShowLabels="False">
        <PointMark Visible="True" Dimensions-Height="20px" Dimensions-Width="20px" Dimensions-AutoSize="False" Figure="Rectangle">
            <FillStyle FillType="Image">
                <FillSettings BackgroundImage="/_layouts/img/triangle.gif">
                </FillSettings>
            </FillStyle>
        </PointMark>
    </Appearance>
</telerik:ChartSeries>

The line series is rendered, but no shape whatsoever is rendered at each point of the line series.

What am I doing wrong here?

Kind regards,
Erik ter Beeke

 

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 26 Apr 2010, 12:42 PM
Hi Erik,

Please, specify the image location as relative to the web application root:

<FillSettings BackgroundImage="~/_layouts/img/triangle.gif">
</FillSettings>

Greetings,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
James
Top achievements
Rank 2
answered on 24 May 2011, 10:15 PM
I see several related tickets, but nothing exactly the same as mine....

We have this working

highStackedBarSeries.Appearance.PointMark.Fill =

 

new SolidColorBrush(Colors.Red);

 

 

highStackedBarSeries.Appearance.PointMark.Shape =

 

MarkerShape.Hexagon;

and we are able to work custom images in as well...  our challenge....   we want to make different decisions per point... some points are high, some are low, some are in valid ranges... we want to use the PointMark to show this by changing out the shape / color / iconset ....   one line, several points, change PointMark on the fly within a single lineseries. ?

Thanks, -James

 

0
Ves
Telerik team
answered on 27 May 2011, 11:55 AM
Hi James,

The ChartSeriesItem has a property PointAppearance, you can use it to customize separate items:

RadChart1.Series[0][1].PointAppearance.FillStyle.FillType = FillType.Solid;
RadChart1.Series[0][1].PointAppearance.FillStyle.MainColor = Color.Green;


Best regards,
Ves
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Chart (Obsolete)
Asked by
Erik ter Beeke
Top achievements
Rank 1
Answers by
Ves
Telerik team
James
Top achievements
Rank 2
Share this question
or