BlazorChartjs icon indicating copy to clipboard operation
BlazorChartjs copied to clipboard

Support for Time Cartesian Axis

Open poulsenj opened this issue 2 years ago • 8 comments

Feature request for handling of large data series where x value is a DateTime. Requires moment.js. Example: https://codepen.io/toxy1337/pen/rQRqrw

poulsenj avatar Dec 08 '22 09:12 poulsenj

Could you change your code using ChartJs 4.1.0 please?

erossini avatar Dec 17 '22 17:12 erossini

I added an example using Chart.js 4.1.0 ( and date.fns) here: https://codepen.io/poulsenj/pen/ZEjXNJm

poulsenj avatar Jan 18 '23 10:01 poulsenj

Added another Chart.js 4.1.0 example using Javascript dates instead of strings. You can then disable Chart.js parsing date strings and get better performance with large data sets. https://codepen.io/poulsenj/pen/vYaewQx

poulsenj avatar Jan 18 '23 10:01 poulsenj

Good thank you. I'll have a look and let you know when the implementation is done.

erossini avatar Jan 19 '23 10:01 erossini

Hey, with the latest version of the component, now you can add time axis. Let me know if it is working for you. Enrico

erossini avatar Apr 22 '24 14:04 erossini

Hi,

Commit a2961e7 implementing Time Cartesian Axis has new struct Enums.TimeUnit, two new classes Models.Common.AxesTime/Models.Common.AxesTimeFormats, and an addition of property AxesTime to class Models.Common.Axis. The current release has those changes, except for the addition of property AxesTime to class Models.Common.Axis. So how is AxesTime brought into play?

Johannes

On Mon, Apr 22, 2024 at 4:21 PM Enrico Rossini @.***> wrote:

Hey, with the latest version of the component, now you can add time axis. Let me know if it is working for you. Enrico

— Reply to this email directly, view it on GitHub https://github.com/erossini/BlazorChartjs/issues/32#issuecomment-2069633402, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCSNGVYALNGNDM6Z45G2T3Y6UMIFAVCNFSM6AAAAAASX42NRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRZGYZTGNBQGI . You are receiving this because you authored the thread.Message ID: @.***>

poulsenj avatar Apr 29 '24 06:04 poulsenj

I got it working by adding property AxesTime to class Models.Common.Axis and adding file wwwroot/lib/Chart.js/moment.js as the chartjs-adapter-moment.js is part of the package, but moment.js itself is not. So moment.js should either be packed as well or included in the users project.

poulsenj avatar May 01 '24 06:05 poulsenj

Hi @erossini, why did you delete AxesTime property in Axis.cs ?

in this commit : Fix conflicts in the PR on Apr 22 2024

NilkOne avatar Nov 22 '24 14:11 NilkOne