<br><br><div class="gmail_quote">On Fri, Jun 1, 2012 at 4:33 PM, Kohei Yoshida <span dir="ltr"><<a href="mailto:kohei.yoshida@gmail.com" target="_blank">kohei.yoshida@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fri, 2012-06-01 at 14:05 -0400, Kohei Yoshida wrote:<br>
> Hello Rafael,<br>
><br>
> On Fri, 2012-06-01 at 11:13 -0430, Rafael Dominguez wrote:<br>
><br>
> > i tried a lot of ideas and looked at how other code handle it but i<br>
> > cant seem to get it work, if you could check it out and fix it or tell<br>
> > me whats wrong, that would<br>
> > be highly appreciated.<br>
><br>
> As we chatted on IRC, I'll try to look into this and hopefully come up<br>
> with an answer. The code around is a bit tricky so give me some time to<br>
> get up to speed on this.<br>
<br>
</div>So, what I did is to build the latest version of master, and played with<br>
X error bars in chart. Here is what I see.<br>
<br>
When I set X error bars, specify the range for the positive and negative<br>
error var values, it gets set correctly. This is good.<br>
<br>
When I save that file, and inspects what gets saved in the XML stream of<br>
that ods file, the ranges I set for X error bars are not saved. Only<br>
those ranges for the Y error bars are saved.<br>
<br>
Another thing I noticed is that, the ranges for the Y error bars are<br>
saved in the style properties that are used by the <chart:series><br>
element. Those attribute names alone don't specify whether they are for<br>
the X or Y bars, and during import we import them for Y error bars,<br>
which is odd.<br>
<br>
I don't know that the ODF spec specifies, but for this to work for both<br>
X and Y error bars, we need to store these ranges in the style<br>
properties that are used for the <chart:error-indicator> element.<br>
Otherwise we won't be able to distinguish whether they are the X error<br>
bars or Y error bars. I've checked the spec, but the spec is awfully<br>
terse about this and I have no clue whether the spec even cares about<br>
what element these attributes are used for. So, for the moment we will<br>
assume that the spec doesn't impose any restriction regarding this.<br>
<br>
Given all this, we will need to first work on the export side, to store<br>
these attributes<br>
<br>
chart:error-upper-indicator<br>
chart:error-lower-indicator<br>
chart:error-category<br>
chart:error-upper-range<br>
chart:error-lower-range<br>
<br>
in the style properties that are used for the <chart:error-indicator><br>
element, instead of those that are used for the <chart:series> element.<br>
<br>
Once that's taken care of, we can work on importing them properly.<br>
<br>
I hope this makes sense. I don't know this was not an answer to your<br>
original question, but in my view, this needs to be worked on first.<br>
<br>
Best,<br>
<div class="HOEnZb"><div class="h5"><br>
Kohei<br>
<br>
--<br>
Kohei Yoshida, LibreOffice hacker, Calc<br>
<br></div></div></blockquote><div><br>Sorry i forgot to tell you that the exporting code is not merged to master, its in features/chart_errorbars i pushed the patch too to that branch.<br><br>About the spec, on ODF 1.2 it you have a dimension attribute to distinguish between the bars, after that theres nothing on paper, what i did is add the needed attributes to chart:error-indicator.<br>
<a href="http://cgit.freedesktop.org/libreoffice/core/log/?h=feature/chart_errorbars"></a> </div></div><br>