View Issue Details

IDProjectCategoryView StatusLast Update
0037486mantisbtplug-inspublic2026-11-04 08:19
ReporterAlgoflash Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version2.28.4 
Summary0037486: MantisGraph : issues_trend_graph.php - invalid render
Description

Data track "Still Open" is below "Reported" then not visible.
Values are OK

Additional Information

Error in MantisGraph.js at Issu trends section.
Fix :

 new Chart(ctx, {
            type: 'line',
            data: {
                labels: $(this).data('labels'),
                datasets: [
                    {
                        label: $(this).data('opened-label'),
                        data: $(this).data('opened-values'),
                        fill: '+1'
                    },
                    {
                        label: $(this).data('resolved-label'),
                        data: $(this).data('resolved-values'),
                        fill: '+1'
                    },
                    {
                        label: $(this).data('still-open-label'),
                        data: $(this).data('still-open-values'),
                        fill: 'origin'
                    },
                ]
            },
            options: {
                scales: {
                    y: {
                        beginAtZero: true,
                        stacked: false,
                        ticks: {
                            precision: 0,
                        }
                    }
                },
                datasets: {
                    line: {
                        tension: 0.3,
                    }
                },
                plugins: {
                    // legend: {
                    //     display: true,
                    //     fillStyle: "#cccccc",
                    // },
                    tooltip: {
                        mode: 'index',
                        position: 'nearest',
                    },
                    colorschemes: {
                        scheme: 'brewer.Set1-3',
                        reverse: true,
                        fillAlpha: 0.15,
                    }
                }
            }
        });
TagsNo tags attached.

Relationships

related to 0034847 closeddregad Upgrade chart.js library to 3.9.1 

Activities

dregad

dregad

2026-11-04 08:11

developer   ~0071566

Last edited: 2026-11-04 08:19

This is by design.

The intention is to show the "still open" with a red background between the green "reported" and blue "resolved" lines (consider it as a kind of cumulated graph, since reported = resolved + still open).

EDIT: this was discussed and implemented as part of the PR fixing 0034847, see https://github.com/mantisbt/mantisbt/pull/2037#issuecomment-2417489111

Click on "resolved" in the legend to hide the data series, and plot the "still open" line from 0.