Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
dashed line display for Line Graph
posted

Hi,

I'm trying to achieve a chart representation like the picture below. So far I was able to combine stacked column and line graph in a single chart. One thing I still don't know about Line Graph is to how to change the type of the line so it is displayed as "dashed" line. Is there an option to be this?

Stacked Column and Lin Graph combination

Thanks in advance.

Regards,

Daniel

  • 8421
    posted

    Hello Daniel,

    At this time implementing a dashed line in the chart is not possible. I found the following product idea in our system that you can vote on: http://ideas.infragistics.com/forums/211535-ignite-ui/suggestions/4177697-igchart-support-multiple-built-in-line-types. Please note that we did evaluate this feature at one time and it was determined that browser canvas support of this feature was not possible at that time, though the API has changed so this should be possible now once the feature is implemented.

     Please note that there is a caveat with this. The chart itself won't be able to switch between a solid line and a dotted line automatically due to performance concerns. The line itself is drawn in one pass to prevent having to break it up in to multiple objects which would take longer to render and require more resources. While this wouldn't have much impact if you only have two line segments like your example it would certainly matter if you were to have millions of switches. That said, in theory this should be possible by breaking your line in to two different series. Have all the solid line points be in one series and have all of the dotted line points be in the other. For the points that don't exist in both series you would leave those as null and skip drawing the null values. Again, you'll have to be careful with this approach as you may encounter performance issues if your count of objects gets high.

    Please let me know if you have any questions or concerns about these matters.