[CLOSED] Configure marker for one datapoint for line graph

Page 2 of 2 FirstFirst 12
  1. #11
    Quote Originally Posted by Daniil View Post
    You should use the Radius setting.
    <MarkerConfig Type="Cross" Radius="10" />
    I tried the below code but its not working for cross:

                    if(isProvisional == '1'){
                                                          attributes.radius = 50;
                                                }
    To increase the size for diamond you have suggested below code which is working:

     var r = 12;
                                                    attributes.path = ['M', 0, - r, 'l', r, r, -r, r, -r, -r, r, -r, 'z'];
    Please let me know if there is any more properties we need to set for cross type in JavaScript.

    Thanks
  2. #12
    Got it.

    Yes, you should change the path. But the formula differs from the diamond's one.
    http://docs.sencha.com/extjs/4.2.1/s...e-method-cross

    Example
    <%@ Page Language="C#" %>
       
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
      
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store s = this.Chart1.GetStore();
                s.DataSource = new object[]
                {
                    new 
                    {
                        x = 0,
                        y = 0  
                    },
                    new 
                    {
                        x = 50,
                        y = 50  
                    },
                    new 
                    {
                        x = 100,
                        y = 100   
                    }
                };
            }
        }
    </script>
      
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Chart
                ID="Chart1"
                runat="server"
                Width="400"
                Height="400">
                <Store>
                    <ext:Store runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="x" />
                                    <ext:ModelField Name="y" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <Axes>
                    <ext:NumericAxis Title="X" Fields="x" Position="Bottom" />
                    <ext:NumericAxis Title="Y" Fields="y" Position="Left" />
                </Axes>
                <Series>
                    <ext:LineSeries Titles="Chart" XField="x" YField="y">
                        <MarkerConfig Type="Cross" />
                        <Renderer Handler="if (this.markerGroup.contains(sprite)) {
                                               var defaultPath = sprite.path;
                                                
                                               if (index === 1) {
                                                   var r = 10 / 1.7;
                                                   attributes.path = 'M'.concat(-r, ',', 0, 'l', [-r, -r, r, -r, r, r, r, -r, r, r, -r, r, r, r, -r, r, -r, -r, -r, r, -r, -r, 'z'])
                                               } else {
                                                   attributes.path = defaultPath;
                                               } 
                                           }
                              
                                           return attributes;" />
                    </ext:LineSeries>
                </Series>
            </ext:Chart>
        </form>
    </body>
    </html>
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 8
    Last Post: Sep 15, 2017, 10:27 PM
  2. [CLOSED] Configure Legend of Line Chart Series
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 31
    Last Post: Oct 19, 2013, 4:32 AM
  3. [CLOSED] Line Graph in ext.net
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 06, 2013, 12:50 PM
  4. [CLOSED] Vertical Marker on partial line series
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 26, 2013, 5:43 PM
  5. [CLOSED] Scatter Graph
    By Tonic in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 04, 2013, 5:50 AM

Tags for this Thread

Posting Permissions