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. Image for the cookie policy date

Column and line charts questions

Hello,

In my company we are currently evaluating charting controls for our new Windows Forms application. One of the components which caught our attention is your ChartView control and we are trying to research its capabilities. Could you please answer our questions and give us some technical hints on how to use your component to meet our requirements?
  1. Column charts. Is it possible for different series' columns to be overlapped (not side by side) and sorted (i.e. for each X argument the Y values of all series are sorted and drawn from the biggest one to the smallest one)
    • We wouldn't like to use transparency in this case.
  2. Line charts. Is it possible to put the data points in the middle of X axis intervals? E.g. having dates on X axis we want to put the value for 01-01-2017 not directly over '01-01-2017' marker but in between the '01-01-2017' and '02-01-2017' markers
    • Still, we would like to show '01-01-2017' in the tooltip, while hovering over the point.
    • Sometimes on the same chart we would like to show two series with different data resolution (e.g. a serie for daily data and a serie for hourly data). It means simply moving the charts by offset won't work for us.
    • Additionally, would it be possible to highlight half of the line to the left of the point and half of the line to the right? So basically, to highlight the whole line between '01-01-2017' and '02-01-2017' markers, including the point?

1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team August 2, 2017 09:35 PM UTC

Hi Ewelina, 

Thanks for contacting Syncfusion support. 

We have analyzed your query. Find the response for your queries below. 

Queries 
Response 
 Is it possible for different series' columns to be overlapped (not side by side) and sorted 
Yes, it is possible by using stacking column series. In this when more than one series were specified, then they will placed as stacking(one above the other) and also we would like to let you know that by default the x axis points will be sorted and the series will get rendered. If you don’t need to sort the points, then specify false to SortPoints of series property. Find the code snippet below to achieve this requirement. 
 
Windows Forms: 
        //Specified points not in order 
           series.Points.Add(1, 31); 
            series.Points.Add(3, 21); 
            series.Points.Add(6, 41); 
            series.Points.Add(5, 29); 
            series.Points.Add(4, 37); 
            series.Points.Add(2, 44); 
        //Specify false if you no need to sort the points 
            series.SortPoints = false; 
            //... 
 
Screenshot with sorted points: 
 

Sample for reference can be find from below link. 

Is it possible to put the data points in the middle of X axis intervals? 
Yes, it is possible to add data points in anywhere in chart area using custom points feature. In custom points you can add text, marker with respect to points, chart coordinates, percentage and pixel. We have prepared sample in date time axis. Here you need to pass the x and y values as double, so we have converted the date time format to milliseconds and achieved your requirement. You can change this with respect to your requirement. Find the code snippet below to achieve this requirement. 

 
            ChartCustomPoint cp = new ChartCustomPoint(); 
            //Rendered custom point with respect to points 
            cp.CustomType = Syncfusion.Windows.Forms.Chart.ChartCustomPointType.PointFollow; 
            cp.Symbol.Shape = ChartSymbolShape.Circle; 
            //Specify the series and point index, so that custom point will be added to that particular position  
            cp.PointIndex = 1; 
            cp.SeriesIndex = 0; 
            //Converted date time format to milliseconds 
            cp.XValue = (new DateTime(2017, 01, 02, 0, 0, 0) - new DateTime(1970, 1, 1)).TotalMilliseconds; 
            cp.YValue = 15; 
            this.chart.CustomPoints.Add(cp); 


Screenshot:  
 

Sample for reference can be find from below link. 

We have also created sample with numerical axis, kindly find the sample from below link. 

For more information on custom points, follow the below link. 

Also we would like to know that the axis type(numerical/datetime) you will be using, so that we can provide you exact solution. 

Sometimes on the same chart we would like to show two series with different data resolution 
Since we are not clear with your query, we would like to know that, whether you need to use multiple axes(two axes) for x axis for different series, so that we can provide you the solution sooner. 
Additionally, would it be possible to highlight half of the line to the left of the point and half of the line to the right?  
We are not clear with your query. So, kindly revert us with some screenshot of your requirement, which will be helpful in further analysis and provide you the solution sooner. 

If any your query is misunderstood at your our end, kindly revert us with more information on the query. 

Dharani. 



Loader.
Live Chat Icon For mobile
Up arrow icon