Bug 82716 - Ability to create histogram chart directly from data, not using FREQUENCY()
Summary: Ability to create histogram chart directly from data, not using FREQUENCY()
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Devansh Varshney
URL:
Whiteboard: target:25.2.0 target:25.2.0.2 target:...
Keywords:
Depends on:
Blocks: Additional-Chart-Types Histogram-Chart
  Show dependency treegraph
 
Reported: 2014-08-17 00:00 UTC by 7qia0tp02
Modified: 2026-04-16 14:07 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Patch 42 of Histogram Chart (60.56 KB, image/png)
2024-07-14 08:39 UTC, Devansh Varshney
Details
Histogram_basicUI_As_BarChart (2.52 MB, image/png)
2026-04-16 12:42 UTC, Devansh Varshney
Details
Histogram_working_calculated-y (989.40 KB, image/png)
2026-04-16 14:05 UTC, Devansh Varshney
Details
Histogram-dynamic-update-data-series-change (3.00 MB, image/png)
2026-04-16 14:07 UTC, Devansh Varshney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 7qia0tp02 2014-08-17 00:00:58 UTC
We should be able to create histograms of a column of data just by selecting that column and creating a chart.  The bin number and log/linear spacing of bins, etc can be set in the plot options window.  Currently it's possible to make histograms using the FREQUENCY() command, but it requires extra plot-only things being added to the spreadsheet.
Comment 1 Jean-Baptiste Faure 2014-08-18 04:26:16 UTC
Please, could you elaborate a bit? I use histogram charts and I never used FREQUENCY() command.

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you have provided requested informations. Thank you for your understanding.

Best regards. JBF
Comment 2 7qia0tp02 2014-08-18 15:16:32 UTC
Can you please describe how to do it without FREQUENCY() command?

For example, if data is 

1
2
3
11
12
13
45

and the bins are 0-10, 11-20, 21-30, etc, then the histogram would have a height of 

 0-10: 3
11-20: 3
21-30: 0
31-40: 0
41-50: 1
51-60: 0

https://en.wikipedia.org/wiki/Histogram

http://ask.libreoffice.org/en/question/17/how-do-you-plot-a-histogram-in-libreoffice-calc/?answer=10011#post-id-10011

http://ask.libreoffice.org/en/question/19816/

https://bugs.freedesktop.org/show_bug.cgi?id=81530
Comment 3 Jean-Baptiste Faure 2014-08-18 19:29:55 UTC
Ok, with complete information it is easier to understand what you mean. For many users who are not statisticians histogram could be understand as bar chart.
Valid enhancement request.

Best regards. JBF
Comment 4 Stanislav Horacek 2015-02-24 07:21:28 UTC

*** This bug has been marked as a duplicate of bug 74665 ***
Comment 5 Jean-Baptiste Faure 2015-02-24 21:17:57 UTC
Changed source and target: this enhancement explain what is expected, while bug 74665 is very cryptic.

Best regards. JBF
Comment 6 Jean-Baptiste Faure 2015-02-24 21:18:49 UTC
*** Bug 74665 has been marked as a duplicate of this bug. ***
Comment 7 David Root 2020-01-15 17:18:04 UTC Comment hidden (spam)
Comment 8 David Root 2020-01-15 17:19:32 UTC Comment hidden (spam)
Comment 9 David Root 2020-01-22 16:56:13 UTC Comment hidden (spam)
Comment 10 7qia0tp02 2023-03-10 20:45:04 UTC
For comparison, Google Sheets allows you to highlight a single column of data, click Insert -> Chart, and it creates a Histogram immediately, by default.  You can then change the "bucket size" in the chart options, etc.

(It doesn't allow you to specify differently-sized "buckets" though, as desired in bug 81530.)
Comment 11 stragu 2024-07-11 01:44:08 UTC
Please also see bug 74665's attachment 192673 [details] for inspiration from Gnumeric's dialog.

Devansh is currently working on this as part of GSoC, see work in progress on gerrit: https://gerrit.libreoffice.org/c/core/+/167068

Devansh, you can mark this report as "assigned" and add yourself to the "Assignee" field.
Comment 12 stragu 2024-07-11 01:45:52 UTC
(In reply to Stéphane Guillou (stragu) from comment #11)
> Please also see bug 74665's attachment 192673 [details] for inspiration from
> Gnumeric's dialog.
See bug 74665 comment 16 for more details, and I recommend installing Gnumeric and testing it first hand.
Comment 13 Devansh Varshney 2024-07-14 08:39:10 UTC
Created attachment 195283 [details]
Patch 42 of Histogram Chart

This is what we are able to have for the histogram chart, as can be seen in the screenshot.

The bars seem to be much wider, which will be updated in an upcoming patch if needed.

As of now, we are using the sqrt method to calculate the number of Bins -

void HistogramChartType::computeBinFrequencyHistogram(const std::vector<double>& dataPoints)
{ 
   //...code

     m_nBins = static_cast<sal_Int32>(std::sqrt(dataPoints.size()));

   //...code
}
Comment 14 Commit Notification 2024-07-21 06:02:59 UTC
varshneydevansh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/07ae0e5ada7cb595eb4815413a5bdd442c32a6ab

tdf#82716 Add initial implementation of the Histogram Chart

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 stragu 2024-07-22 01:43:17 UTC
I have opened the meta bug 162134 to track follow-up enhancements and bugs. Maybe this can be closed as "fixed" then, if you agree, Devansh and Quikee?
Thanks for the initial implementation!
Comment 16 Devansh Varshney 2024-07-22 19:07:53 UTC
(In reply to Stéphane Guillou (stragu) from comment #15)
> I have opened the meta bug 162134 to track follow-up enhancements and bugs.
> Maybe this can be closed as "fixed" then, if you agree, Devansh and Quikee?
> Thanks for the initial implementation!

Okay I am looking in the META bug tracker.
Comment 17 Commit Notification 2024-08-04 09:01:32 UTC
varshneydevansh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/aebe61498bd226b2392cdfcfe5ad7db4489bd48e

tdf#82716 Implement Correct Calculation for Histogram Chart

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Mike Kaganski 2024-09-22 12:08:47 UTC
Please add  to the release notes.
Comment 19 Buovjaga 2024-11-12 14:31:25 UTC
(In reply to Mike Kaganski from comment #18)
> Please add  to the release notes.

Renewing the request: https://wiki.documentfoundation.org/ReleaseNotes/25.2
Comment 20 Regina Henschel 2024-12-05 15:44:16 UTC
(In reply to Buovjaga from comment #19)
> (In reply to Mike Kaganski from comment #18)
> > Please add  to the release notes.
> 
> Renewing the request: https://wiki.documentfoundation.org/ReleaseNotes/25.2

I think, it should not be added to the ReleaseNotes for 25.2. The feature is in a state that it should not be published with 25.2.

The main problem is, that the chosen design does not allow a simple, proper save/load with ODF and use of the chart wizard, and that the chart type itself belongs to an extension of OOXML, for which no code yet exists in LibreOffice. Thus there is currently no way to save/load a Histogram chart. That effects the clipboard as well. The time till rc1 of 25.2 is too short to proper fix the problems.

The Histogram chart could be hidden from the UI, only enabled as experimental feature or be removed from the 25.2 release totally. I would prefer the latter, because that keeps is visible as having to be fixed for 25.8.
Comment 21 Eyal Rozenberg 2024-12-05 21:05:13 UTC
(In reply to Regina Henschel from comment #20)
> The main problem is, that the chosen design does not allow a simple, proper
> save/load with ODF and use of the chart wizard,
> ... 
> Thus there is currently no way to save/load a Histogram chart.

These two sentences seem to contradict. Can we, or can we not, save histogram charts to ODS, and load them from ODS?

> and that the chart type
> itself belongs to an extension of OOXML, for which no code yet exists in
> LibreOffice.

Well, the code exists if it's being considered for 25.2 ... can you clarify what you mean?


Note that I'm not against your position; if the feature is indeed not well-baked enough that it should probably wait.
Comment 22 Regina Henschel 2024-12-05 22:38:16 UTC
(In reply to Eyal Rozenberg from comment #21)
> (In reply to Regina Henschel from comment #20)
> > The main problem is, that the chosen design does not allow a simple, proper
> > save/load with ODF and use of the chart wizard,
> > ... 
> > Thus there is currently no way to save/load a Histogram chart.
> 
> These two sentences seem to contradict. Can we, or can we not, save
> histogram charts to ODS, and load them from ODS?

We cannot save and load from ods.

> 
> > and that the chart type
> > itself belongs to an extension of OOXML, for which no code yet exists in
> > LibreOffice.
> 
> Well, the code exists if it's being considered for 25.2 ... can you clarify
> what you mean?

The code does not exist. We cannot save and load from xlsx.
Comment 23 Devansh Varshney 2024-12-24 11:14:42 UTC
(In reply to Regina Henschel from comment #22)
> (In reply to Eyal Rozenberg from comment #21)
> > (In reply to Regina Henschel from comment #20)
> > > The main problem is, that the chosen design does not allow a simple, proper
> > > save/load with ODF and use of the chart wizard,
> > > ... 
> > > Thus there is currently no way to save/load a Histogram chart.
> > 
> > These two sentences seem to contradict. Can we, or can we not, save
> > histogram charts to ODS, and load them from ODS?
> 
> We cannot save and load from ods.
> 
> > 
> > > and that the chart type
> > > itself belongs to an extension of OOXML, for which no code yet exists in
> > > LibreOffice.
> > 
> > Well, the code exists if it's being considered for 25.2 ... can you clarify
> > what you mean?
> 
> The code does not exist. We cannot save and load from xlsx.

Regarding the XLSX file, we need to add support for reading the chartEx namespace (http://schemas.microsoft.com/office/drawing/2014/chartex)(https://epplussoftware.com/docs/7.0/api/OfficeOpenXml.Drawing.Chart.ChartEx.ExcelChartEx.html) as that is where the chart extension is defined.

an old chart uses http://schemas.openxmlformats.org/drawingml/2006/chart (https://epplussoftware.com/docs/7.0/api/OfficeOpenXml.Drawing.Chart.ExcelChartStandard.html) namespace and it has c:chart element, which we import normally.
Comment 24 Commit Notification 2025-01-12 12:10:01 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9693f1461c7d78c7461f8bbd7f421ba8c3f8452b

tdf#164593 Revert "tdf#82716 Add initial implementation of the His.."

It will be available in 25.2.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2025-06-12 15:12:41 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/c01d79b8d35b252817acc6a7618b283d00fcd0ff

tdf#164593 Revert "tdf#82716 Add initial implementation of the His.."

It will be available in 25.8.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2025-11-14 07:45:10 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/58d2a68530e2b47fc9f2ec82fd5ac5603db1f8ca

tdf#164593 Revert "tdf#82716 Add initial implementation of the His.."

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 george 2026-04-05 10:13:46 UTC
Hello everyone,

I noticed the recent comments mentioning that this feature was supposed to be added in the 26.2 release. However, I have updated to the latest version and a native, 1-click "Histogram" chart type is still nowhere to be found in the Chart Wizard.

Here is my current version information:
Version: 26.2.2.2 (X86_64)
Build ID: 620(Build:2)
CPU threads: 16; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: el-GR (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:26.2.2.2-0ubuntu0.24.04.1~lo1
Calc: threaded

To reiterate the importance of this feature and why the current situation is problematic:
Users are still forced to go through a tedious manual workaround to create a basic statistical chart. We still have to manually determine bin limits, use the FREQUENCY array formula (or build a Pivot Table), insert a standard column chart, and manually change the spacing to 0%.

This puts LibreOffice at a significant competitive disadvantage compared to MS Excel (which introduced the 1-click Histogram in 2016) and Google Sheets. Data analysis is a core use-case for Calc, and forcing students, researchers, and professionals to use manual workarounds for such a fundamental chart type is a major pain point.

Could someone clarify the status of this implementation? Was it delayed, is it hidden behind an experimental feature flag, or does it require a specific extension? If it hasn't been implemented in the main UI yet, please consider this a strong vote to keep this issue open and prioritize it.

Thank you for your hard work!
Comment 28 Regina Henschel 2026-04-05 11:33:12 UTC
Development was not finished in time and it is not clear when it will be finished. There is ongoing work in https://gerrit.libreoffice.org/c/core/+/203033.
Comment 29 Devansh Varshney 2026-04-05 18:04:22 UTC
(In reply to Regina Henschel from comment #28)
> Development was not finished in time and it is not clear when it will be
> finished. There is ongoing work in
> https://gerrit.libreoffice.org/c/core/+/203033.


The biggest problem of saving the calculated bins in calculated-y is working.
So, no overwriting on the input values is now being handeled correctly.

Right now I am trying to make the CI happy but once it is done ODF format support wont be a big problem.

Regarding OOXML support for new chart namespace Kurt started working on it I have look first how much is done then we can speed up OOXML support too.
Comment 30 Devansh Varshney 2026-04-16 12:42:09 UTC
Created attachment 206706 [details]
Histogram_basicUI_As_BarChart

Bringing Histogram chart again after it is being reverted from the master
along with the bug fixes which were done later on.

This implementation currently rendering the Bar Chart with NO GAP which can be seen in this image.

https://gerrit.libreoffice.org/c/core/+/203741

Which is a proof of this basic integration of how the upcoming DataSequence and Bin Calculation logic will make it complete :)

---------

Context for the revert descision -

https://community.documentfoundation.org/t/esc-meeting-minutes-2025-11-13/13382
Comment 31 Devansh Varshney 2026-04-16 14:05:21 UTC
Created attachment 206708 [details]
Histogram_working_calculated-y



Histogram multiple dataseries selected and only rendering the first series which is what MSO does with its Histogram rendering which is also discussed in this bug report https://bugs.documentfoundation.org/show_bug.cgi?id=163713
Comment 32 Devansh Varshney 2026-04-16 14:07:42 UTC
Created attachment 206709 [details]
Histogram-dynamic-update-data-series-change


As can be seen in this image screenshot when we are changing the data-range or its content the Histogram Chart now is updating the Bin Range or the Frequency accordingly which is the desired behavior.

As discussed in this BZ report -
https://bugs.documentfoundation.org/show_bug.cgi?id=162240