We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

With Stacked Column Chart, cannot remove the spacing between bars.

Thread ID:

Created:

Updated:

Platform:

Replies:

124058 May 12,2016 01:51 AM May 27,2016 07:52 AM ASP.NET MVC 3
loading
Tags: Chart
mehmet m
Asked On May 12, 2016 01:51 AM

Hi,

I am trying to remove the space between the consecutive data point using Stacked Column Chart, as per the requirements of the project. 

I have tried;

Setting `Width` property on the `CommonSeriesOptionsBuilder` , on the `SeriesBuilder`, on each point added to the Series.

Maybe a tricky way, Using regular Column Chart with a pair of series, of which one is added to another in element-wise fashion. Setting the SideBySide property to `false`,  then using

$('#container').ejChart('option', { commonSeriesOptions: { columnSpacing: 0 } });
$('#container').ejChart('option', { commonSeriesOptions: { columnWidth: 1 } });
To no avail. 
Is this case covered by Syncfusion Charts? If so how can I achieve the effect?
The image attached can give you a clearer view on the requirements.
Thanks in advance.

Attachment: Capture_e54d2b26.zip

Sanjith Kesavan [Syncfusion]
Replied On May 13, 2016 05:22 AM

Hi Mehmet, 

Thanks for contacting Syncfusion support. We have analyzed your query and screenshot. To remove the space between the consecutive data points in the stacked column chart, please follow the below code. 

[CSHTML] 
.CommonSeriesOptions(cr => cr.Type(SeriesType.StackingColumn).EnableAnimation(true).ColumnSpacing(0).ColumnWidth(1).Tooltip(tt => tt.Visible(true) 
        .Format("#series.name#  <br/> #point.x# : #point.y# Million Visitors"))) 
 
In the above code, we have set the columnSpacing as 0 and columnwidth as 1. By default, border width for the series is 1 and border color is transparent, so this will leave some space between the points, to avoid this, please set the same color for border and series. Please find the below screenshot. 
 
 
In the below link, we have attached sample for your reference.  

Regards, 
Sanjith. 


mehmet m
Replied On May 26, 2016 08:27 AM

When I tried your solution I got: 

CS1061: 'Syncfusion.JavaScript.DataVisualization.CommonSeriesOptionsBuilder' does not contain a definition for 'ColumnSpacing' and no extension method 'ColumnSpacing' accepting a first argument of type 'Syncfusion.JavaScript.DataVisualization.CommonSeriesOptionsBuilder' could be found (are you missing a using directive or an assembly reference?)

Copy pasting the Chart code to existing project resulted in the same error being raised. Is this a version issue, if so which version should I be using?

Sanjith Kesavan [Syncfusion]
Replied On May 27, 2016 07:52 AM

Hi Mehmet, 

We have analyzed your query. We have provided the ColumnSpacing and ColumnWidth support from Essential studio 14.1.0.41 version. If you are using Essential studio prior to this version, then please update your Essential Studio to the current version (14.1.0.46).  

Regards, 
Sanjith. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;