Submind YouTube summaries
Thumbnail for LibreOffice Conference 2026: Histogram Chart support

LibreOffice Conference 2026: Histogram Chart support

Watch on YouTube

Video summary

The development of native histogram support in LibreOffice began as part of the 2024 Google Summer of Code project, driven by the need to address limitations found in existing workarounds like using column charts for statistical data. The creator initially explored various approaches and discovered a CERN document that utilized standard bar charts to simulate histograms, which served as a foundational reference. To replicate this functionality accurately, the team adopted the Scott rule formula, a method also employed by Microsoft Excel, to calculate bin widths and ensure compatibility with established statistical standards. This initial phase involved removing gaps between bars to create a continuous visual representation, successfully mimicking the look of a histogram while leveraging existing rendering engines for bar and column charts. A significant technical hurdle emerged regarding file interoperability, specifically concerning the Office Open XML (OXML) format introduced in Microsoft Office 2016. When attempting to import or export these new chart types, LibreOffice encountered errors because it lacked support for the specific namespace used by newer Microsoft charts. Through collaborative debugging involving team members like Thomas and Regina, it was identified that a new chart namespace was required for post-2016 features. Consequently, the project evolved to support both the ODF format, which uses extended bar chart tags labeled as histograms, and the OXML format, where specific tags were implemented to handle these newer chart structures, allowing files to be saved and opened correctly across different office suites. Despite achieving visual compatibility with Microsoft Excel, a critical architectural issue was discovered related to how LibreOffice manages data roles and input values. The original implementation inadvertently overwrote the raw input data with calculated frequency values, causing the loss of source information whenever a chart was saved or reloaded. To resolve this, the team implemented a separate storage mechanism that preserves the original input values while using a distinct sequence for calculated frequencies during the rendering process. This approach ensures that when the chart is displayed, it overrides the cache with the correct frequency data to draw accurate bars without altering or losing the underlying dataset, effectively preventing data corruption upon file manipulation. The project has reached a stage where histogram functionality closely matches Microsoft Excel's output, though minor precision differences remain due to how overflow and underflow bins are handled in the Scott rule calculation. These discrepancies are currently being discussed for potential refinement, but the core feature is considered complete enough to move out of experimental mode by October. Looking ahead, the team plans to extend this work to support Pareto charts, which will likely follow a similar development path. With both ODF and OXML formats now functional and the data integrity issue resolved, native histogram support in LibreOffice is set to become a usable feature for users seeking robust statistical visualization tools within their office suite.
Read the full video transcript
So, this project histogram has been went through a lot of catastrophes I say. I mean, it began with the Google Summer of Code project in 2024. But, I think I started with I just begin like I started exploring what project should I work but then while looking down over the histograms all the little bit details around over where I found this CERN document where they were using LibreOffice for, you know, creating histograms using column chart which was a bit pain. So, I found I realized that that means that it's the impact of LibreOffice or instances is quite large when I was like initially began exploring LibreOffice. And since column chart or bar chart are similar to histogram as we can see with the CERN document they're using it. We reused the bars bar charts rendering. And the formula which we are using here is the Scott rule which is Microsoft using it. They documented it. I mean, there are certain other formulas also for histogram but we're using Scott rule. This is the first part when we began working on it and we first just initially removed the gaps between the bar chart or the column chart and it was a little success for us to get to the point where histogram can be look. That's from 2024. At first you can see that it's looking quite good. The data ranges are matching with what Microsoft has. But there is a problem I mean with bar chart when we're using the rendering they had a problem which which we will see. That's with the Google Docs they're using a different formula and I never bothered to look into it which they were using. So, that's where it is. But the first of all which came across with me in front of me and Thomas was the OXML part. I mean, I think I worked around three and a half weeks at the last moment of the Summer of Code project, but I wasn't able to have it exported or imported. So, I tried to open Excel sheet, which I created with Microsoft Office, and it started showing this error message. I mean, it's like a fallback message, and it didn't bother. Thomas said, "Uh maybe I'm missing something because initially we never thought that it's architecture problem, not just with with a beer, like I'm missing something out with a bar chart." So, I dig down, and I look at the XML, I found this this fallback message, I sent to Thomas, and then he started digging down, and he found out that there's entire new chart name space, which Microsoft has created for the new charts after 2016. All the charts which are uh introduced in Microsoft Office 2016. And then we actually have two formats, and here Regina also helped a lot. I think Michael also was raising this point. I was just talking with him. We're using for ODF using the bar chart here, but we are extending the extension this telling that it's a histogram, just like a label, but the problem I think which might arise after the new charts when we start working. Maybe Pareto chart can work on this, but other charts I'm not sure about it. So, we have to also consider about extending or maybe introducing new tags for ODF format. I think that's we should be considering now. And the second part is the chart DX. I think Kurt was working on it, and it's almost complete with XML support in Collabora Office. And so, he was working on it, and he looked down into it, and Microsoft actually I think named histogram as clustered columns, and that's where this tag is coming from. And so, the ODF part actually highlighted by Regina. She helped us how to approach this, and the OXML part is done by Kurt entirely, I think. And these are the two formats which we are supporting, and it's now being able to save and open. The model flow, I started I also mentioned that the initially the bars are looking pretty good like a histogram. And if you can go, it's just matching exactly what we wanted. And Thomas and I were very happy. At least we have something, but there was a major problem with this. Actually, LibreOffice, what it does, it has roles associated with all the input values it has. And here, as you can see that if you have two values for column chart, uh, we tag these roles, but the values Y is the one which actually, uh, puts entire row value or the input value itself into the X axis. And that created a problem because we were rewriting the, uh, input value with the calculated frequencies over here. As you can see the five and one, we rewriting it. And the originally I pointed out that this is a big problem and you two are doing a big blunder here because you overwrite it and the input values are gone. And even if you're able to have OXML and ODF support being working, uh, the save chart is always going to be five and one and then everything is going to break after it. So, input values are lost and that's a big problem. So, uh, the approach we took here is, uh, introducing a separate, uh, storage to, uh, keep these frequencies or these calculated values for a while, uh, while we, uh, make sure that, uh, our input values do not alter at any point. And the same as categories, we are having the same part, but here with the sequence, as you can see, uh, we're not assigning any role. We haven't decided because, uh, I don't know what what the new chart is going to have it, but, uh, for now, only histogram is accessing it and it's being, uh, owned by a histogram data sequence. So, when the chart is created, it owns the input values. And the calculated values, sorry. And, uh, the interesting part is that we are, uh, when Audio? Are you good? Okay, okay. Okay, sorry. Okay. So, uh, for view, what we're are is we are not, uh, what we are doing at the exact point of the view when view is about to be rendered we are overriding the cache with the calculated value with with these frequencies so the bars whenever they drawn into the into the sheet it matches with the frequency it doesn't shows the original bar chart values. So here is it I think we are able to have histogram matching with Microsoft Office pretty well and here you can see that there are some I think precision difference which we are having with the same formula with Microsoft I'm not sure about it why and Microsoft also does pre-calculate the overflow and underflow bins which we have to work Thomas and I were discussing about it and this is pretty much what histogram is and the next is going to be Pareto chart. So I think by October this may be completed and my I think by completed I mean we can take out from the experimental mode it's so I think histogram would be usable at least. And yeah that's it. >> Someone have a question? Okay we can stop. >> Okay thanks.