Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | display bars on different axis next to each other | ||
---|---|---|---|
Product: | General | Reporter: | moltis17 <moltis> |
Component: | chart | Assignee: | kla <thomas.klarhoefer> |
Status: | CLOSED FIXED | QA Contact: | issues@graphics <issues> |
Severity: | Trivial | ||
Priority: | P3 | CC: | bjoern.milcke, issues, pagalmes.lists, stevej, tony.galmiche.ooo, weizhao |
Version: | 3.3.0 or older (OOo) | Keywords: | rfe_eval_ok |
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
URL: | http://specs.openoffice.org/chart/BarChartOptions.odt | ||
Issue Type: | FEATURE | Latest Confirmation in: | --- |
Developer Difficulty: | --- | ||
Issue Depends on: | |||
Issue Blocks: | 72764 | ||
Attachments: |
Description
moltis17
2004-03-22 10:26:03 UTC
Hi, this is submitted under the wrong component. It's Chart not Spreadsheet. I've corrected this. Frank Hi Bettina, one for you. kla I can confirm this defect still exists in OOo1.1.1 tested on Linux, XP, W2K Any data assigned to 2nd Y axis is displayed behind 1st Y axis data. There is no way to place/display bars side by side. Can provide repeatable examples if this will help. SteveJump Reassigned to Ingrid. Displaying bars next to each other is more useful than displaying them behind each other. This is also valid if the bars are scaled at different axis. We should introduce a posiibility to do this. I forgot to mention that MS Excel 2003 displays them next to each other as it should be. Showing them behind each other simply is not useful at all in most cases. Created attachment 30116 [details]
sample file for the problem also showing a possible workaround using overlapping bars
Created attachment 30118 [details]
basic sample file. note that a secondary y-axis is important as soon as the data sequences have a significant different scale.
Hi Moltis, thanks for the example files. The problem is clear I think. But I have a question regarding Excel. What are you exactly doing within MS Excel 2003 that you get your bars displayed next to each other if they are at different axes. I am asking because I cannot reproduce that. Thanks for your help! Hi Ingrid! I'm very sorry. My statement about how Excel 2003 displays it was not first hand, but came from a step-by-step solution description of a student homework task. Obviously I misinterpreted the instructions, because Excel 2003 does not any better than OO so far. I just tried it on a customer system I happen to have in house at the moment - I do not own MS Office myself - why should I since there is OO :). Nevertheless, no reason not to go beyond what Microsoft currently offers. :) I suggest to add a parameter to shift a data sequence in respect to others and/or a check box to show them next to each other - same as in a normal bar graph diagram. Sorry again! Moltis No problem. Thanks for the fast response. I tend to implement something like a checkbox only. I fear that an extra flexible shift value produces to much confusion as we do already have two other values that influence the positions of bars in respect to each other. Maybe we can collect some extra opinions here. Feel free to comment. changed target in prio Changed Target to 2.x Target set to Later Ok, 3.0 seems more appropriate *** Issue 70745 has been marked as a duplicate of this issue. *** changed target to 2.x hint for development: First we need a check box, where the user can switch to the new modus. A good place might be the options tabpage of the data series properties dialog in case of 2D bar charts. The source code for this tabpage is in: chart2/source/controller/dialogs/tp_SeriesToAxis.hxx chart2/source/controller/dialogs/tp_SeriesToAxis.cxx chart2/source/controller/dialogs/tp_SeriesToAxis.src chart2/source/controller/dialogs/TabPages.hrc Look how the implementation works for the similar checkbox CB_CONNECTOR on the same page (visible only in case of 2D stacked bar or column charts) and try to introduce the new checkbox 'CB_GROUP_BARS_PER_AXIS'. hint for development: Now the information must be stored in the model. We want to keep the boolean information once for the whole chart. Add a new boolean property to the diagram and call it 'GroupBarsPerAxis'. Look how this is done for the similar property 'ConnectBars' in chart2/source/model/main/Daigram.cxx. Hi, bm & iha I have added a checkbox to the data series dialog, and add a new boolean property call 'GroupBarsPerAxis' for the checkbox to the diagram, it works well. I have modified the function BarChart::createShapes() to show the bars or columns which attached to 2nd y axis next to each other. Please see the effect at the attached issue26795.pdf. Is the effect right? I meet a problem when I try to save and load the property of the checkbox, I have added XML_GROUP_BARS_PER_AXIS to xmltoken.cxx, xmltoken.hxx and PropertyMap.cxx, it is compiled successfully, but it does not work. Could you give some suggests about that? Thank you very much! Regards, Weizhao Created attachment 46846 [details]
effect of new method
Adding bm to CC For saving and loading the standard chart API ::com::sun::star::chart is used for most of the objects. There are wrappers for this older API in chart2/source/controller/chartapiwrapper/. We need the new property 'GroupBarsPerAxis' also at the DiagramWrapper. Look how this is done for the similar property 'StackedBarsConnected'. I think you will not need the line with 'aWrappedProperties.push_back( new WrappedProperty ....' because the new property is exactly the same in the new and in the old API. changed target Hi, bm & iha The attached is the patch of this issue. If you have any question or suggestion, please let me konw. Thank you very much. BTW: My email is: weiz@ch2000.com.cn Best regards, Weizhao Created attachment 47070 [details]
the patch
Hi weiz. Thanks, the patch is almost fine :-). But there are some points to improve still: - SCHATTR_END must be set to the new define SCHATTR_GROUP_BARS_PER_AXIS - the changes in BarChart.cxx are too complicated, try to change only the method BarChart::addSeries by replacing the comment "////if( bars side by side ) zSlot = 0; //@todo uncomment this later on dependent on new flag" with: if( !pSeries->getGroupBars() ) zSlot = 0; -in the method ChartTypeHelper::isSupportingGroupBars() it would be more save to check eStackMode != StackMode_NONE -The default for GroupBarsPerAxis is true. GroupBarsPerAxis == true should represent the behavior that we had without this feature: The bars were grouped per y-axes. - So the method should better be named ChartTypeHelper::isSupportingNotToGroupBarsPerAxis() - I think it would be better to not shorten 'GroupBarsPerAxis' to 'GroupBars' as the latter can be misinterpreted more easily - consider to not offer the setting when all series are attached to the same axis, because there is no visible effect then - finally it's easier to compile when you add the new token at the end of the token list in xmloff. Otherwise consider to use an alphabetical place and make an incompatible build from xmloff. Hope I haven't overseen anything. Looking forward to the next version :-) Hi, iha Thanks very much for your great help. I will improve the patch according to your suggestion, and I will submit it again if I finish the modify. :-) Hi bm & iha, The attached is the revised patch according to your suggestions. I have added some new functions to disable the check box when all series are attached to the same axis. It seems work well, but I am not sure that these new functions are added to the suitable place. :-) If you have any suggestion, please email me. Thank you very much. Regards, Weizhao Created attachment 47502 [details]
revised patch
Hi bm & iha, This is the new patch for this issue. The major changes are as follow: -Remove the unused two static variables and functions in last patch. -Use two bool variables 'm_bSupportingNotToGroupBarsPerAxis' and 'm_bAllSeriesAttachedToSameAxis' to determine whether the new check box displayed on the tab page. Please let me know if you have any suggestion. Thanks very much. :-) Best Regards, Weizhao Created attachment 47741 [details]
new patch
Hi bm, This is the latest patch for this issue. Pleae find the final attachment. Best regards, Weizhao Created attachment 47894 [details] issue26795_070830 patch weiz: I'll take over this issue. Note that there is one small open issue: Imagine that all series are attached to the first axis except one series that is attached to the second one. Then you edit the properties of that one series that is on the second axis. You attach it to the first axis, then the "group bars by axis" will not be disabled. I think this is a minor issue. To solve this, we would have to pass the entire model to the dialog, which I want to avoid for now. (Or pass quite complicated data to the dialog). ->weiz: Thanks a lot for your patch! reassigning to bm. Please verify in CWS chart14 Of course, this issue is fixed. *** Issue 82237 has been marked as a duplicate of this issue. *** The feature doesn't correspond with the Settings for Spacing and Overlap. . When the new feature is used (check side by side), setting overlap and gapwifth does not work as expected. I fixed the following in addition: Overlap and gapwifth do work now also when the bars are shown next to each other. The remaining problem was, that the bars have used different settings for overlap and gap width from the different axes. Now when switching on the new feature in the dialog the settings for overlap and gapwidth are applied equally to both axes. And in addition in the view there is a mechanism to ensure that the same values are used for all bars. ->Thomas, please verify in CWS chart14. Created attachment 48996 [details]
TCS Bar Chart Option
works fine in cws chart14 -> verified Seen ok in the current version -> closed |