By: Paul
Date: 2013-11-05
Time: 16:31
|
Graph generationHallo,
I am generating a .docx file with TBS. It is a great plugin and it works very well for me. However, I have a problem, could you help me? I am merging multiple user data with my template in a block. This works very good. Except, when I put a graph into this block. I don't receive any error messages. But the document is then "broken" and it won't open. When I merge only one user, it works. Even with the same code. First I merge all the available data, and the unique names of the Graphs (into the title field). And then loop though all the unique names to set the data. When a chart is copied in a block, I think the serie names also disappear. Because I received an error. Now, I access the series in a loop not by name but by number. Is it even possible to insert a graph in a block? Thank you for your support in advance. And thank you for this great plugin. Kind regards, Paul |
By: Skrol29
Date: 2013-11-07
Time: 01:02
|
Re: Graph generationI'm afraid it is not possible to multiply a graph that is placed in a TBS block.
If you have zero or one record, it will be ok. But it the graph element it multiplied in the document that will make an error. This is because the graph definition is stored in several sub-file in the DOCX and it would be quite complicated for OpenTBS (for now) to multiply all the sub-files and bind them correctly into the main body. But there is a workaround : they are some PHP classes that enables you to create nice graphics as PNG pictures. The you can prepare all the graphics as PNG and merged them in the DOCX using OpenTBS. |
By: Paul
Date: 2013-11-07
Time: 08:52
|
Re: Graph generationThank you for your reply! That's too bad. It will be a great feature though!
I think that the workaround is a good idea. Do you have any recommendations for a PHP library for creating graphs/charts as PNG pictures? It is unfortunate that the graphs will not be editable. But, it's okay :). I am very curious about the next version of TBS! Again, thank you. Kind regards, Paul |
By: Skrol29
Date: 2013-11-10
Time: 22:54
|
Re: Graph generationI used to work with pChart:
http://pchart.sourceforge.net/ |
By: Paul
Date: 2013-11-12
Time: 08:36
|
Re: Graph generationThank you. I used pChart too and it's a good workaround for my problem. I recommend it to other people who also struggle with the same scenario.
|