Bug 149561 - Chart type is not saved when an empty XY Scatter or any chart is created
Summary: Chart type is not saved when an empty XY Scatter or any chart is created
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart-Wizard
  Show dependency treegraph
 
Reported: 2022-06-14 08:56 UTC by Sergey Y
Modified: 2022-06-16 13:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Y 2022-06-14 08:56:42 UTC
I'm trying to add empty chart:
Insert -> Chart -> XY (scatter) -> Lines Only -> Finish
Result: calc create chart with type "Points and Lines". Same for any type of charts (calc cteates empty chart with wrong type).

This bug persists for a long time. It can be minor unnoying bug but sometimes if you build chart with many rows and with different positions of names and data in sheets, it randomly broke the wholl chart if you trying to change it's type afterwards.

P.S. And creating chart through Chart Wizard never work for me, because my sheets always have splited X's and Y's so I always create empty charts and than add data raws/columns manually.
Comment 1 Rafael Lima 2022-06-14 14:31:11 UTC
Repro with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 66b849eab05bb6b696cced84ca90c17ca1bc31dd
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL

To reproduce:
1) Insert an empty chart by simply going to Insert - Chart and then XY (Scatter) and choose the "Lines Only" type.
2) Click Finish and deselect the chart
3) Double-click the newly inserted chart
4) Right-click and choose Chart Type
5) Notice that the option "Points and Lines" is selected instead of "Lines Only"

Changing the chart type to "Points only" or "Lines only" using this dialog has no effect.

Changing it to "3D Lines" will effectively change the chart type. But if you double-click it and then go to Chart Type, then the dialog will show no chart type selected, which is also a bug.

Setting this to NEW.
Comment 2 Julien Nabet 2022-06-15 20:47:00 UTC
I suppose that when chart is empty, ScatterChartTypeTemplate::matchesTemplate (https://opengrok.libreoffice.org/xref/core/chart2/source/model/template/ScatterChartTypeTemplate.cxx?r=fef939d8#198) doesn't "guess" the right subtype.

Tomaž: any idea how to save the subtype so it can be retrieved easily instead of guessing it in ChartTypeTabPage::initializePage() ?
(see https://opengrok.libreoffice.org/xref/core/chart2/source/controller/dialogs/tp_ChartType.cxx?r=b7c260ae#302)