[CLOSED] How to draw a custom line (solid, dotted) on chart at specific position?

  1. #1

    [CLOSED] How to draw a custom line (solid, dotted) on chart at specific position?

    I want to draw custom solid and dotted lines on chart at specified position from C# code, can anyone tell me how to do this?
    Last edited by Daniil; Apr 07, 2014 at 2:20 PM. Reason: [CLOSED]
  2. #2
    Hi @PriceRightHTML5team,

    This way:
    <ext:Chart>
        <Items>
            <ext:Sprite ... />
        </Items>
    </ext:Chart>
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @PriceRightHTML5team,

    This way:
    <ext:Chart>
        <Items>
            <ext:Sprite ... />
        </Items>
    </ext:Chart>
    Hi @Daniil,

    I tried with following code:
    var line=new Sprite { Type = SpriteType.Path, X = 100, Y = 100, Path = "M0.5,0.5L16.5,0.5", ZIndex = 7000,  Stroke = "#000", StrokeWidth = 1 }
    Added above sprite to Items collection of Chart, but it shows line at 0,0 position, not at 100,100 as specified.
  4. #4
    It appears that a path SVN element doesn't support x, y.

    You should change the Path to:
    "M100.5,100.5L116.5,100.5"
  5. #5
    Quote Originally Posted by Daniil View Post
    It appears that a path SVN element doesn't support x, y.

    You should change the Path to:
    "M100.5,100.5L116.5,100.5"
    Thanks @Daniil.

    It worked. Please close the thread.

Similar Threads

  1. Replies: 7
    Last Post: Jun 19, 2014, 5:49 AM
  2. [CLOSED] Dotted line renders as solid line in line chart image
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 01, 2014, 5:28 PM
  3. Replies: 3
    Last Post: Mar 12, 2014, 7:36 AM
  4. [OPEN] [#262] Dashed/Dotted chart grid lines
    By livehealthierGF in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 31, 2013, 9:24 PM
  5. [CLOSED] Problem to draw a chart into a panel
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: May 23, 2012, 11:01 AM

Posting Permissions