Page MenuHomePhabricator

Add support for histograms
Open, LowPublicFeature

Description

Feature summary

Currently, Extension:Charts has a bar chart option. The idea of bar chart is explained at https://en.wikipedia.org/wiki/Bar_chart

Reviewing https://www.mediawiki.org/wiki/Extension:Chart#Bar

This is a good bar chart, nicely done. This can be used for categorical data. There are gaps between the bars, which separate the categories.

Similar to bar charts, but different, however, are histograms. Histograms are explained at https://en.wikipedia.org/wiki/Histogram

The histogram's bars should be

  1. Potentially of variable width, because the bin size varies; it's the area that's important.
  2. Continuous, i.e. there should be no gaps between the bars. Histograms are used for continuous data.

Benefits:

Major type of chart, important in statistics.

Event Timeline

CCiufo-WMF renamed this task from Extension:Chart should support histograms. to Add support for histograms.May 1 2025, 3:02 AM

I'm not sure that this is "low importance" -- it seems a little more important than that.

@Bugreporter2: Nobody ever said it's "low importance". It's currently low priority though.

Yes, to clarify, this is currently not a priority for the team working on Charts. The low priority does not mean it is low value.

If someone does pick this up: I think one thing to think through is whether a new "histogram" chart type is really needed, or if this is more of a modification / configuration option for the "bar" chart type.

ECharts does not have a designated chart type for histograms. Histograms can simply be rendered as a bar chart.

Regarding the pre-processing of data into the histogram bins, a statistical library such as https://github.com/ecomfe/echarts-stat could be used. This library is not available for MediaWiki. However, the chart team is working on T388579, a generic data pre-processing mechanism involving Lua modules.

Further reading: https://blog.niuruihua.com/2023/10/13/How-to-create-histogram-chart-with-echarts and https://programmer.ink/think/using-echarts-to-draw-histogram.html

CCiufo-WMF raised the priority of this task from Low to Needs Triage.May 16 2025, 6:04 PM