<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif">Hi everyone,</span></div><div class="gmail_default"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:arial,sans-serif">Thanks for such a detailed discussion. I have corrected certain parts of the PR <a href="https://gerrit.libreoffice.org/c/core/+/177364">https://gerrit.libreoffice.org/c/core/+/177364</a></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif">and the 'make' build is still running from 4:46 PM.</span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,sans-serif">You should specify the new chart type as it would be specified in the <br>
standard. That text can go to our Wiki, linked from <br><a href="https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_Extensions" rel="noreferrer" target="_blank">https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_Extensions</a>. <br>
Writing it down helps you to become clear about functionality and helps <br>
in writing the UNO information in the idl-file. Currently the info in <br>
the idl file is not detailed enough. You can look at section "19.15 <br>
chart:class" in ODF 1.3. <br>
[<a href="https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html" rel="noreferrer" target="_blank">https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html</a>] <br>
and in the corresponding information for Excel. Search for histogram on <br>
site:<a href="http://microsoft.com" rel="noreferrer" target="_blank">microsoft.com</a> and look at its specification in [MS-ODRAWXML]. You <br>
need to extend the above mentioned List_of_LibreOffice_ODF_Extensions in <br>
any case.</span></blockquote><span style="font-family:arial,sans-serif">
Added to the Implementer Notes but have to make a more detailed blog post.</span></div><div class="gmail_default"><span style="font-family:arial,sans-serif">(should I post that on TDF/LO Blog?)<br></span></div><div class="gmail_default"><span style="font-family:arial,sans-serif"><br></span>
</div><div class="gmail_default"><span style="font-family:arial,sans-serif"><br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,sans-serif">
You must extend the schema. Those changes go to <br><a href="https://opengrok.libreoffice.org/xref/core/schema/libreoffice/OpenDocument-v1.4%2Blibreoffice-schema.rng" rel="noreferrer" target="_blank">https://opengrok.libreoffice.org/xref/core/schema/libreoffice/OpenDocument-v1.4%2Blibreoffice-schema.rng</a>. <br>
That is missing in your patch.</span></blockquote><span style="font-family:arial,sans-serif">
Done (in the PR)<br></span></div><div class="gmail_default"><span style="font-family:arial,sans-serif"><br></span>
</div><div class="gmail_default"><span style="font-family:arial,sans-serif"><br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,sans-serif">
The histogram chart does not belong to the charts, that are specified in <br>
the standard. Thus it needs a value for the chart:class attribute, that <br>
has a loext prefix, e.g. chart:class="loext:histogram". A schema change <br>
is not needed for this value, because the data type for the value of <br>
this attribute is already 'namespacedToken'.<br>
You have added the 'bin' related information to the <chart:series> <br>
element. A <chart:plot-area> element can have several <chart:series> <br>
sub-elements. I guess, that you do not want to allow several series in <br>
the same histogram. Excel does no allow it. Restricting it in the schema <br>
is difficult. (Or do you have an idea, Michael?) I suggest to restrict <br>
it in the specification text.<br>
You export the labels for the x-axis as loext:BinRange. I would not <br>
export them at all for these reasons:<br>
(A) Excel does not export that information.<br>
(B) The chart has a reference to the area of the data source in the <br>
table. The content of this area might come from an external source, e.g. <br>
a database engine. When the file is loaded, this data might be refreshed <br>
and changes. Thus the bin labels and their frequency values might not <br>
fit to the information that are put into the file when saving.<br>
You write the 'bin' related information as attributes of the <br>
<chart:series> element. You should consider to use one child element <br>
instead, that contains all needed information. That way you can use a <br>
dedicated context when loading the file. The schema would get one new <br>
child-element for the <chart:series> element and a new section for this <br>
new element itself. Michael, what do you think?</span></blockquote>
</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif">Still have to discuss this with Tomaz</span><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><blockquote class="gmail_default gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-family:comic sans ms,sans-serif"></span>Different variations (types) are possible for the histogram chart. You <br>
need to specify in the text how the bins are calculated. Especially how <br>
'automatic' works and how overflow and underflow bins influence the bin <br>
intervals.</blockquote><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif">We are using the Scott Rule to calculate the Histogram Chart automatically, which is also used by my MSO.<br></span></div><div class="gmail_default"><span style="color:rgb(103,78,167);font-family:arial,sans-serif">chart2/source/model/template/HistogramCalculator.cxx</span></div><div class="gmail_default"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:arial,sans-serif">Here are those changes for the <b>Underflow and Overflow</b> <b>calculations</b>(I reverted these changes during the cleanup of the PR)<br></span></div><div class="gmail_default"><a href="https://gerrit.libreoffice.org/c/core/+/170909/43/chart2/source/model/template/HistogramCalculator.cxx" style="font-family:arial,sans-serif">https://gerrit.libreoffice.org/c/core/+/170909/43/chart2/source/model/template/HistogramCalculator.cxx</a></div><div class="gmail_default"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><ul><li><span style="font-family:arial,sans-serif"> Overflow Bin: Added at the end of <span style="color:rgb(116,27,71)">maBinRanges</span> and <span style="color:rgb(116,27,71)">maBinFrequencies</span> for values exceeding a threshold.</span></li><li><span style="font-family:arial,sans-serif"> Underflow Bin: Inserted at the beginning for values below a threshold.</span></li></ul></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><blockquote class="gmail_default gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You use two attributes for a underflow bin, one whether such underflow <br>
exists and one with its value. I think that can be combined. In <br>
implementation and schema it would be optional. The specification text <br>
then needs to contain, what is used, when this attribute is missing. <br>
Same for overflow. Excel has data type ST_DoubleOrAutomatic.</blockquote><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">I have to do this</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,sans-serif">You write the new attributes with XML_NAMESPACE_CHART. It has to be </span><br><span style="font-family:arial,sans-serif">
XML_NAMESPACE_LO_EXT.</span><br><span style="font-family:arial,sans-serif"></span></blockquote>
<span style="font-family:arial,sans-serif">Corrected<br></span></div><div class="gmail_default">
<span style="font-family:arial,sans-serif"><br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,sans-serif">
You can use the histogram chart only in ODF extended. The according case </span><br><span style="font-family:arial,sans-serif">
distinctions are missing.</span><br><span style="font-family:arial,sans-serif"></span><span style="font-family:arial,sans-serif"></span><br><span style="font-family:arial,sans-serif"></span><span style="font-family:arial,sans-serif"></span><br><span style="font-family:arial,sans-serif">
ODF uses for attributes and element names a style with natural language </span><br><span style="font-family:arial,sans-serif">
terms separated by hyphen. Please keep this style. So instead of an </span><br><span style="font-family:arial,sans-serif">
attribute loext:histogram-binwidth it should be </span><br><span style="font-family:arial,sans-serif">
loext:histogram-bin-width. And instead of loext:histo it should be </span><br><span style="font-family:arial,sans-serif">
loext:histogram.</span><br><span style="font-family:arial,sans-serif"></span></blockquote>
<span style="font-family:arial,sans-serif">Corrected<br></span></div><div class="gmail_default">
<span style="font-family:arial,sans-serif"><br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,sans-serif">
On one hand you use a UNO property FrequencyType with datatype short and </span><br><span style="font-family:arial,sans-serif">
possible value 0 to 3, on the other hand you assign the property value </span><br><span style="font-family:arial,sans-serif">
to aFrequencies, which is a Sequence< double > ???</span><br><span style="font-family:arial,sans-serif"></span></blockquote>
<span style="font-family:arial,sans-serif">Corrected<br></span></div><div class="gmail_default">
<span style="font-family:arial,sans-serif"><br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,sans-serif">
Excel uses for histograms the element CT_Binning (see 2.24.3.7 in </span><br><span style="font-family:arial,sans-serif">
[MS-ODRAWXML]). That has the attribute intervalClosed to determine, </span><br><span style="font-family:arial,sans-serif">
whether the start or end side of the bin interval is open. The </span><br><span style="font-family:arial,sans-serif">
corresponding attribute is missing.</span></blockquote></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Did add in the RNG file, but have to make changes in other places too.<br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif"><a href="https://msopenspecs.azureedge.net/files/MS-ODRAWXML/%5bMS-ODRAWXML%5d-240820.pdf">https://msopenspecs.azureedge.net/files/MS-ODRAWXML/%5bMS-ODRAWXML%5d-240820.pdf</a><br></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif">Regarding Kurt's and Michael's reply<br></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif">I will discuss with Tomaz(Quikee) what are his thoughts about how should I approach it.<br></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, 17 Dec 2024 at 21:46, Kurt Nordback <<a href="mailto:kurt.nordback@protonmail.com">kurt.nordback@protonmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This bug is relevant to the question of handling multiple series in a histogram chart.<br>
<br>
<a href="https://bugs.documentfoundation.org/show_bug.cgi?id=163713" rel="noreferrer" target="_blank">https://bugs.documentfoundation.org/show_bug.cgi?id=163713</a><br>
<br>
Kurt<br>
<br>
<br>
Sent with Proton Mail secure email.<br>
<br>
On Monday, December 16th, 2024 at 11:02 PM, Mike Kaganski <<a href="mailto:mikekaganski@hotmail.com" target="_blank">mikekaganski@hotmail.com</a>> wrote:<br>
<br>
> Hi Devansh, hi Regina,<br>
> <br>
> On 17.12.2024 4:51, Regina Henschel wrote:<br>
> <br>
> > You have added the 'bin' related information to the chart:series<br>
> > element. A chart:plot-area element can have several chart:series<br>
> > sub-elements. I guess, that you do not want to allow several series in<br>
> > the same histogram. Excel does no allow it. Restricting it in the<br>
> > schema is difficult. (Or do you have an idea, Michael?) I suggest to<br>
> > restrict it in the specification text.<br>
> <br>
> <br>
> <br>
> I suggest to check if OOXML restricts it. Sticking to the current Excel<br>
> behavior is reasonable as an implementation; but hardcoding the existing<br>
> implementation detail of Excel as a standard's wording would make it<br>
> hard to adapt, when Excel extends the implementation - it would need a<br>
> breaking change or a new chart class. (I don't know if such an extension<br>
> could make sense in principle, so this is just a general remark, maybe<br>
> nonsensical in this context - sorry for that.)<br>
> <br>
> <br>
> --<br>
> <br>
> Best regards,<br>
> <br>
> Mike Kaganski<br>
</blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-family:monospace"><b>Regards,</b></span></div><div><span style="font-family:monospace;color:rgb(153,0,255)"><b>Devansh</b></span><br></div></div></div>