Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column chart not taking given width when using datetime axis #73

Closed
LaxmikanthMadhyastha opened this issue Jan 15, 2020 · 2 comments
Closed

Comments

@LaxmikanthMadhyastha
Copy link

I have given width as 1 for all the column charts. But all the charts have different widths. I have tried multiple combinations but don't seem to get all the charts to have the same specified width.

charts.add(ColumnSeries<ChartData, DateTime>( dataSource: data, yAxisName: 'yAxis1', name: 'Steps', xAxisName: 'xAxis1', color: Colors.green, width: 1, opacity: 0.7, xValueMapper: (ChartData sales, _) => sales.x, yValueMapper: (ChartData sales, _) => sales.y));

WhatsApp Image 2020-01-15 at 12 25 34 PM

@dharanidharandharmasivam
Copy link
Contributor

Hi @LaxmikanthMadhyastha ,

Thanks for using our Syncfusion Flutter widgets. We have analyzed the reported scenario and we would like to let you know that, the width of each column will be calculated based on the available axis width, number of points and width property specified in series. This is the actual behavior.

We have prepared a sample to depict this scenario in which we have 3 charts, each one having 4, 5 and 2 data points respectively. The column of these 3 charts renders with different in size.

Screenshot:
Screenshot_20200115_203236_com example line_series - Copy

The sample can be found below.
https://www.syncfusion.com/downloads/support/directtrac/general/ze/sample-293318928

Thanks,
Dharani.

@madhukar01
Copy link

Is there a way we can override this behaviour?
This is too cumbersome when plotting a time series.

For example if I want to plot a single data point in a chart spanning 24 hours, currently I am being forced to provide 24 points so that bar width remains same across all charts.
Most of the libraries handle this by default for a timeseries / Datetime axis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants