Comments (6)
I believe it should be inside an illustration
, but I have not been able to produce a simple working example.
from z3c.rml.
@strichter any idea about this one?
from z3c.rml.
@Abdur-rahmaanJ All the charts are only available in drawings as they draw directly on the canvas. So <illustration>
is a way to add a drawing in the story. That's what I do.
I thought I had added a mode that will raise an error when a tag is in a place where it is not supposed to be. But I guess it is not exposed in the CLI. Ah yes, z3c.rml.directive.ABORT_ON_INVALID_DIRECTIVE
.
from z3c.rml.
Ok let me try! Did not understand @rapto's comment!
from z3c.rml.
@strichter this outputs a blank page:
<!DOCTYPE document SYSTEM "rml.dtd">
<document filename="01.pdf">
<template>
<!--this section contains elements of the document -->
<!--which are FIXED into position. -->
<pageTemplate id="main">
<frame id="first" x1="100" y1="400" width="150" height="200"/>
</pageTemplate>
</template>
<stylesheet>
<!--this section contains the STYLE information for -->
<!--the document, but there isn't any yet. The tags still -->
<!--have to be present, however, or the document won't compile.-->
</stylesheet>
<story>
<illustration height="5cm" width="5cm">
<barChart dx="2in" dy="7in" dwidth="6in" dheight="4in" x="0" y="0" width="5in"
height="3in" barSpacing="7" groupSpacing="15">
<bars>
<bar fillColor="blue" strokeColor="red" strokeWidth="0.5"/>
<bar fillColor="yellow" strokeColor="green" strokeWidth="1"/>
</bars>
<categoryAxis strokeColor="black" strokeWidth="1">
<labels fontName="Helvetica" fontSize="20"/>
<categoryNames>
<name>Category 1</name>
<name>Category 2</name>
<name>Category 3</name>
<name>Category 4</name>
</categoryNames>
</categoryAxis>
<valueAxis valueMin="0" valueMax="150" valueStep="30" visibleTicks="true"
visibleLabels="true" forceZero="true">
<labels fontName="Helvetica"/>
</valueAxis>
<data>
<series>100 110 120 130</series>
<series> 70 80 85 90</series>
</data>
</barChart>
</illustration>
</story>
</document>
from z3c.rml.
Here's a version that works for future reference:
<!DOCTYPE document SYSTEM "rml.dtd">
<document filename="01.pdf">
<template>
<!--this section contains elements of the document -->
<!--which are FIXED into position. -->
<pageTemplate id="main">
<frame id="first" x1="100" y1="400" width="150" height="200"/>
</pageTemplate>
</template>
<stylesheet>
<!--this section contains the STYLE information for -->
<!--the document, but there isn't any yet. The tags still -->
<!--have to be present, however, or the document won't compile.-->
</stylesheet>
<pageDrawing>
<setFont name="Helvetica-Bold" size="16" />
<drawCenteredString x="4.1in" y="11in">
Bar Chart Demo
</drawCenteredString>
<barChart dx="2in" dy="7in" dwidth="6in" dheight="4in" x="0" y="0" width="5in"
height="3in" barSpacing="7" groupSpacing="15">
<bars>
<bar fillColor="blue" strokeColor="red" strokeWidth="0.5"/>
<bar fillColor="yellow" strokeColor="green" strokeWidth="1"/>
</bars>
<categoryAxis strokeColor="black" strokeWidth="1">
<labels fontName="Helvetica" fontSize="20"/>
<categoryNames>
<name>Category 1</name>
<name>Category 2</name>
<name>Category 3</name>
<name>Category 4</name>
</categoryNames>
</categoryAxis>
<valueAxis valueMin="0" valueMax="150" valueStep="30" visibleTicks="true"
visibleLabels="true" forceZero="true">
<labels fontName="Helvetica"/>
</valueAxis>
<data>
<series>100 110 120 130</series>
<series> 70 80 85 90</series>
</data>
</barChart>
</pageDrawing>
</document>
from z3c.rml.
Related Issues (20)
- How to render example rml HOT 1
- paraStyle and blockTableStyle names are not handled separately HOT 3
- length can be defined in docInit but is not recognized in a length attribute like frame.x1 HOT 1
- rlPyCairo is missing
- May a pdf file could be use as a image?
- How to register arial font?
- Implement placePara-Tag in the z3c.rml-Parser
- Issues properly rendering Burmese/Myanmar in PDFs HOT 1
- How to generate the actual pdf?? HOT 2
- Zope independency HOT 5
- Some bugs HOT 2
- *color="None" HOT 1
- Implementation of some *Box elements HOT 2
- Maintaining error: extra files installing
- <para> within <td> doesn't use paraStyle
- Special characters inside <td> are not handled correctly HOT 3
- <para> tag causing list index out of range error HOT 8
- <td>colspan & rowspan HOT 1
- svg2rlg seems not to be compatible with Python3 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from z3c.rml.