[OPEN] [#461] Why dotted line is shown as solid in the charts exported image?

  1. #1

    [OPEN] [#461] Why dotted line is shown as solid in the charts exported image?

    I have a line chart with dotted lines, when I do "Save Chart" (Chart exported as image), dotted lines shown as solid lines in image.

    I have applied following style to make line dotted.
    .Style(new SpriteAttributes { StrokeDashArray = "5", StrokeWidth = 2 })
    Any solution for this?
    Last edited by Daniil; Apr 01, 2014 at 5:29 PM. Reason: [OPEN] [#461]
  2. #2
    Hi @Pradip,

    Yes, it is a problem. Here is a full sample to reproduce.

    I am afraid we don't have a solution. At least, we won't find it fast.

    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>
    
        <script>
            var save = function () {
                App.Chart1.save({
                    type: "image/png"
                });
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            
            <ext:Button runat="server" Text="Save" Handler="save" />
    
            <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">
                        <Style StrokeDashArray="10" StrokeWidth="5" />
                    </ext:LineSeries>
                </Series>
            </ext:Chart>
        </form>
    </body>
    </html>
    You might be interested to read this thread:
    http://forums.ext.net/showthread.php...l=1#post107515
    Last edited by Daniil; Mar 13, 2014 at 6:49 AM.
  3. #3
    Hi @Daniil,

    Can you please tell me till when this issue will be solved?
  4. #4
    Sorry, I don't know.

    Created an Issue to track the defect.
    https://github.com/extnet/Ext.NET/issues/461

    I am doing some investigation on this issue.
  5. #5
    Quote Originally Posted by Daniil View Post
    Sorry, I don't know.

    Created an Issue to track the defect.
    https://github.com/extnet/Ext.NET/issues/461

    I am doing some investigation on this issue.
    Thanks @Daniil. Hopefully, we will get solution soon.
  6. #6
    I am afraid there won't be a quick solution. I am even not 100% sure we will be able to fix it in Ext.NET v2. Hopefully, it will be fixed in ExtJS v5 and, respectively, in Ext.NET v3.
    Last edited by Daniil; Jun 19, 2014 at 5:49 AM.
  7. #7
    Hi @Daniil,

    Any update on this?
  8. #8
    I am afraid there is no any update on that.

Similar Threads

  1. [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
  2. [CLOSED] Dynamic line charts with unknown number of yfields
    By jchau in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 22, 2013, 8:34 AM
  3. [CLOSED] Unable to change charts line color
    By odyssey in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Jan 18, 2013, 5:01 AM
  4. Replies: 6
    Last Post: Dec 01, 2011, 8:20 AM
  5. [CLOSED] Display sum of column in exported file
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 07, 2011, 7:18 PM

Posting Permissions