<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Thanks, Regina, for such detailed information. This helped me to approach the</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">import/export for the Histogram Chart.<br></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">I have added changes to the ODF Export for the Histogram Chart.</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Have to add support for the Import and addition in the RNG file.<br></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"><a href="https://gerrit.libreoffice.org/c/core/+/177364">https://gerrit.libreoffice.org/c/core/+/177364</a></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">Would anyone from the community be able to help me by reviewing the PR?</div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, 1 Dec 2024 at 02:03, Regina Henschel <<a href="mailto:rb.henschel@t-online.de">rb.henschel@t-online.de</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">Hi Devansh,<br>
<br>
I have put the dev list in CC, because such questions should go to the <br>
dev list. There are other people too that can answer your questions. I'm <br>
not an expert for charts and I have not always time to answers in a <br>
reasonable time frame.<br>
<br>
Devansh Varshney schrieb am 29.11.2024 um 14:38:<br>
> Hi Regina,<br>
> <br>
> I have been working on adding the Histogram Chart to the LO <br>
> codebase(part of GSoC-24), and it is working well.<br>
<br>
I think, it is still a lot to do:<br>
<br>
Missing "bin"-properties<br>
<br>
Filesave, bug 164108.<br>
<br>
The use and meaning of "Y-Values" in the wizard is unclear, bug 164109. <br>
Problem with empty "Categories" in the wizard, no bug report yet. The <br>
role "values-y-original" is undocumented.<br>
<br>
> <br>
> Now I am tasked to add the import and export support for the same but <br>
> what I am unable to get is where to begin exactly I have added the <br>
> entries in the token files - <a href="https://gerrit.libreoffice.org/c/core/+/177364" rel="noreferrer" target="_blank">https://gerrit.libreoffice.org/c/core/+/177364</a><br>
> <br>
> These two are the import files for the import and export -<br>
> <br>
> xmloff/source/chart/SchXMLExport.cxx<br>
> <br>
> xmloff/source/chart/SchXMLImport.cxx<br>
> I have looked for ODF-related PRs and even on OOo but could not find <br>
> anything related to adding new chart support for ODF.<br>
<br>
The type of a chart is determined by the chart:class attribute of the <br>
<chart:chart> element. The value of the chart:class attribute is a <br>
namespaced token. The twelve predefined chart types use the namespace <br>
'chart'. Since a histogram chart does not belong to the predefined chart <br>
types, it needs a namespace other than 'chart'. So you should write it <br>
out as chart:class="loext:histogram".<br>
<br>
Because your new chart type needs some properties, which will be in <br>
loext namespace as well, you can write the new chart type only in an <br>
extended ODF version.<br>
<br>
The chart:class attribute is specified in section 19.15.1 in ODF 1.3, [1].<br>
<br>
Properties of the new chart type do not become attributes of the <br>
<chart:chart> element, but become attributes of the <br>
<style:chart-properties> child element of the <style:style> element <br>
which is referenced by the chart:style-name attribute of an affected <br>
element. That is a <chart:plot-area>, <chart:series> or <chart:axis> <br>
element, for example.<br>
<br>
That is currently wrong for ofPie charts, see bug 163921. So you cannot <br>
use ofPie charts as template.<br>
<br>
Such properties belong to the property map aXMLChartPropMap[].<br>
<br>
In your case the labels of the x-axis are generated strings which are <br>
not contained in the sheet. So you cannot use the <br>
chart:cell-range-address attribute of the <chart:categories> element <br>
with a reference into the sheet.<br>
In your case the values in y-direction are generated values which are <br>
not contained in the sheet. So you cannot use the <br>
chart:value-cell-range-address of the <chart:series> element with a <br>
reference into the sheet.<br>
<br>
I have no ready to use solution to solve the problems. The same problems <br>
are visible in the chart wizard as mentioned above.<br>
There can currently only be one local table. So using an additional <br>
local table would require changes in that area.<br>
Changing the <chart:categories> and <chart:series> elements so that they <br>
can carry fixed values might be a solution too.<br>
OOXML does not save the values themselves but only writes the layout <br>
properties. So that idea might be a way to go as well. In that case we <br>
would need to decide whether new attributes of <chart:categories> and <br>
<chart:series> are used or new entries in <style:chart-properties><br>
I think these problems need some discussion.<br>
<br>
[1] <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>
The change to version 1.4 is ongoing. In your case you can still use the <br>
v1.3 specification. The access to the ODF 1.3 specification is easier.<br>
<br>
Kind regards,<br>
Regina<br>
<br>
<br>
<br>
<br>
<br>
<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>