aider/_posts
Paul Gauthier 10bb7c7402 aider: Fixed the issue with dates not being shown correctly on the x-axis.
# Aider chat conversation:

USER: the dates aren't being shown as dates on the x-axis. they are coming out as large integers like 1,888,000,000,000

ASSISTANT: To fix the issue with the dates not being shown correctly on the x-axis, we need to modify the `xAxes` configuration in the Chart.js options. Here's the *SEARCH/REPLACE block* with the necessary changes:

_posts/2024-05-13-models-over-time.md
```markdown
<<<<<<< SEARCH
          xAxes: [{
            type: 'time',
            time: {
              unit: 'month',
              tooltipFormat: 'll'
            },
=======
          xAxes: [{
            type: 'time',
            time: {
              unit: 'month',
              tooltipFormat: 'll',
              parser: 'YYYY-MM-DD'
            },
            ticks: {
              callback: function(value, index, values) {
                return new Date(value).toLocaleDateString();
              }
            },
>>>>>>> REPLACE
```

The changes made are:

1. Added the `parser: 'YYYY-MM-DD'` option to the `time` configuration to specify the date format used in the data.
2. Added a `ticks.callback` function to format the tick labels on the x-axis as localized date strings.

These modifications should ensure that the dates are displayed correctly on the x-axis of the scatter plot.
2024-05-15 10:48:18 -07:00
..
2023-05-25-ctags.md Link more blog articles 2024-02-19 13:25:43 -08:00
2023-07-02-benchmarks.md Link more blog articles 2024-02-19 13:25:43 -08:00
2023-10-22-repomap.md Link more blog articles 2024-02-19 13:25:43 -08:00
2023-11-06-benchmarks-1106.md Added post symlink 2024-02-19 13:08:49 -08:00
2023-11-06-benchmarks-speed-1106.md layout 2024-02-19 14:49:23 -08:00
2023-12-21-unified-diffs.md Link more blog articles 2024-02-19 13:25:43 -08:00
2024-01-25-benchmarks-0125.md Link more blog articles 2024-02-19 13:25:43 -08:00
2024-03-08-claude-3.md make all highlight_images jpg 2024-05-09 09:50:05 -07:00
2024-04-09-gpt-4-turbo.md make all highlight_images jpg 2024-05-09 09:50:05 -07:00
2024-05-02-browser.md copy 2024-05-02 19:04:18 -07:00
2024-05-13-models-over-time.md aider: Fixed the issue with dates not being shown correctly on the x-axis. 2024-05-15 10:48:18 -07:00