Repository navigation
Add L.chart and LChart for bar charts - #23
Merged
Merged
Conversation
L.chart builds a chart, and LChart.series, LChart.category and LChart.value its parts. LChart.value takes a Number or a String, and writes a double in full, without an exponent. Work: 686
Nothing kept the Float branch of LChart.value: through doubleValue(), 0.1f would be written 0.10000000149011612, which a value label shows. Work: 686
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core adds a
<chart>element with bar charts (lpdfio/lpdf#195). This adds its builders, so a chart can be built in code as in XML.What changes
L.chart(ChartAttr, parts)builds a chart, andLChart.series,LChart.categoryandLChart.valueits parts, with their nodes.L.charttakes noNoAttr, astypeandheightare required.LChart.value(NoAttr, List.of(41200))takes anInteger, aLong, aShort, aByte, aBigInteger, aBigDecimal, aDouble, aFloator aString, andLChart.value(NoAttr)is no value. A double is written throughBigDecimalin full, without the exponentDouble.toStringwrites for1.2345678E7, and a whole double without its.0; aBigDecimalkeeps its scale.ChartAttr,ChartSeriesAttrandChartCategoryAttr, and the constantsChartType,ChartDirectionandChartLegend, generated from the schema (make gen-sdk-api).How it was checked
mvn test: 258 pass, with tests for the nodes, the numbers, a float written from its own digits, the PDF of a chart built in code against the PDF of its XML, and a category with the wrong count of values.NoAttributesTestcoversLChart.make check-codegen-sdk-javaagainst the engine and schema of core's branch: 1047 of 1047 documents render the PDF of their XML, the chart fixtures and corpus documents among them.Work: 686