Custom image as PointMark

Thread is closed for posting
4 posts, 0 answers
  1. Erik ter Beeke
    Erik ter Beeke avatar
    1 posts
    Member since:
    Mar 2010

    Posted 21 Apr 2010 Link to this post

    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

     

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 26 Apr 2010 Link to this post

    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.
  3. James
    James avatar
    5 posts
    Member since:
    Nov 2010

    Posted 24 May 2011 Link to this post

    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

     

  4. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 27 May 2011 Link to this post

    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.

Back to Top