Git Product home page Git Product logo

Comments (11)

dbzhang800 avatar dbzhang800 commented on May 18, 2024

Sorry, we still have no charts support at present.

from qtxlsxwriter.

dbzhang800 avatar dbzhang800 commented on May 18, 2024

FYI, I have just added very very basic chart support in the dev branch. The example can be found at

https://github.com/dbzhang800/QtXlsxWriter/blob/dev/examples/xlsx/chart/main.cpp

from qtxlsxwriter.

roniemartinez avatar roniemartinez commented on May 18, 2024

Great! I will check this library more often. :D

from qtxlsxwriter.

an-ky avatar an-ky commented on May 18, 2024

Hi,

just tried this and it is awesome.
How much effort are logarithmic axis on line charts?
I'd do it by myself and contribute the code but need some hints where to start with it.

Thanks.

[update]
great. found it in ChartPrivate::saveXmlAxes and with a little help from http://www.schemacentral.com/sc/ooxml/e-draw-chart_scaling-1.html it works quite well.
as far as I understand the code, it is currently not intended to expose the XlsxAxis type to the public API, isnt't id?
[/update]

from qtxlsxwriter.

dbzhang800 avatar dbzhang800 commented on May 18, 2024

Hi, thanks for your feedback.

I don't have a clear idea how to export it at present. The problem is that, when users open a .xlsx files which contains charts, then save it again, it's not easy to keep all the charts information.

from qtxlsxwriter.

an-ky avatar an-ky commented on May 18, 2024

Hi,

the charts carry quite a bunch of attributes. I extended them to allow scatter charts with value axis and it is a lot of attributes.
As soon as I have some time to tidy up the code I'd like to post a patch/pull request so we can discuss the changes. Is this OK?

greets.

from qtxlsxwriter.

dbzhang800 avatar dbzhang800 commented on May 18, 2024

Hi an-ky, any contributions are welcomed. Thanks

from qtxlsxwriter.

Co0olCat avatar Co0olCat commented on May 18, 2024

Hi,

First of all -> great product. Good work.

Second: looks to be and issue: when sheet name has spaces -> chart is is empty

QXlsx::Document xlsx;   

xlsx.addSheet("one");
xlsx.addSheet("two_and_space"); // Works as expected
//xlsx.addSheet("two and space"); // Does not work

for (int i=1; i<10; ++i) {
    xlsx.write(i, 1, i*i*i);   //A1:A9
    xlsx.write(i, 2, i*i); //B1:B9
    xlsx.write(i, 3, i*i-1); //C1:C9
}

QXlsx::Chart *pieChart = xlsx.insertChart(3, 3, QSize(300, 300));
pieChart->setChartType(QXlsx::Chart::CT_Pie);
pieChart->addSeries(QXlsx::CellRange("A1:A9"));
pieChart->addSeries(QXlsx::CellRange("B1:B9"));
pieChart->addSeries(QXlsx::CellRange("C1:C9"));

xlsx.saveAs("Book1.xlsx");

Thank you.

Kind regards,
TY

from qtxlsxwriter.

Co0olCat avatar Co0olCat commented on May 18, 2024

Hi,

I hope it is easy one:

Is there a way to have two different chart types combined? Say line and bar?

Thank you.

Kind regards,
TY

from qtxlsxwriter.

nblock avatar nblock commented on May 18, 2024

I can confirm the whitespace issue reported by @Co0olCat. A sheet name without whitespaces works like a charm.

from qtxlsxwriter.

Co0olCat avatar Co0olCat commented on May 18, 2024

Hi,

Quick fix (without going into changing the code) is to use single quotation marks in the name of sheet:

xlsx.addSheet("'two and space'");

Thank you.

Kind regards,
TY

from qtxlsxwriter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.