Sign in to follow this  
Son Huynh

Step Line Chart - Dashed Line With Lots Of Data Points

Recommended Posts

Hi, I am trying to implement a Step line chart with a dashed line. However when having lots of data points (> 500), the points become so smushed together that the dash line effect is not visible. It appears as a solid line. When implementing the same chart with the same data points using pure HighCharts, the dash effect appears as one would expect.

 

Can anyone help?

 

Thank you.

Share this post


Link to post
Share on other sites

Please see the attached data file and following code blocks:

 

View:

 


@model FusionChartsPrototype.Controllers.HomeController

@Html.Raw(Model.Chart)

 

 

Controller:

 


       public ActionResult Index()
       {
           FusionCharts.SetRenderer("javascript");

           Chart = FusionCharts.RenderChart("../Charts/MSStepLine.swf", "../Data/Data.xml", "", "myChart", "600",
                                                   "300", false, true);

           return View(this);
       }

       public string Chart { get; set; }

 

Thank you!

Data.xml

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum.

 

Due to more number of data points and reduced chart dimension, dashed line appears to be solid line.

 

Please try setting "lineDashLen" attribute in the chart element. If the lines are shown as dashes, this attribute defines the length of dash.

 

Also, try increasing the chart dimension.

 

Hope this helps.

 

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum.

 

Due to more number of data points and reduced chart dimension, dashed line appears to be solid line.

 

Please try setting "lineDashLen" attribute in the chart element. If the lines are shown as dashes, this attribute defines the length of dash.

 

Also, try increasing the chart dimension.

 

Hope this helps.

 

 

Hi, thanks for the response.

 

Yes I've tried the lineDashLen attribute but it doesn't help. Due to requirements, I'm limited to smaller chart dimensions. When I implement it in regular HighCharts with the same number of data points, it seems to work just fine. I'm not sure why FusionCharts doesn't work in JavaScript?

 

Can you also explain why the Flash version of it renders really weird?

 

Thank you!

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Like Swarnam has explained, it is due to huge number of data points.

 

In case of Flash chart, the same applies. There are huge number of data plots which are very close to each other.

 

Please turn on the anchors and you will be able to render a similar chart to that of JavaScript chart.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this