encharter 0.11 (development)
New features
Complete coverage of the ECMA-376 plot area chart types. Newly supported:
ofPieChart(Pie of Pie / Bar of Pie, incl.barOfPiealias and$set_of_pie_options()for subtype, second plot size, and split logic) and the 3D typesbar3DChart,line3DChart,pie3DChart,area3DChart, andsurface3DChartwith a new$set_3d_options()for the 3D view (rotation, perspective, height/depth percent, right-angle axes, gap depth, bar shape).New niche axis options:
tick_lbl_skip,tick_mark_skip(category axes) anddisp_units(value axes, built-in units like"thousands"or a custom numeric unit) on allset_*_axis()methods.$set_data_label_style()gainsshow_ser_name,show_percent,show_bubble_size, and aformatnumber format string (the latter now also works for ChartEx labels).Input validation against the OOXML schema (ECMA-376 dml-chart.xsd). Values that would produce files Excel repairs or refuses to load now error at input time (e.g.
overlapoutside -100..100,gap_width> 500,marker_sizeoutside 2..72,log_baseoutside 2..1000, polynomial trendlineorderoutside 2..6). Structural problems Excel bails on despite valid XML are warned about at render time (stock charts without 3-4 series, pie types combined with axis-based types, log scale with non-positive minimum). Harmless out-of-schema values that Excel renders fine (e.g.hole_size = 0) remain accepted.Colors are validated at input time; R color names (e.g.
"red","steelblue") are now converted to hex instead of silently rendering black.ChartEx$set_waterfall_colors(increase, decrease, total)sets the semantic waterfall colors by replacing the first three entries of the chart’s color style part (colors{n}.xml), which is what waterfall maps Increase, Decrease, and Total onto. Both the bars and the legend keys reflect the colors. Accepts hex, R color names, andopenxlsx2::wb_color()including theme colors. Use a per-pointcolorvector inadd_series()for individual outliers instead.ChartEx$set_color_cycle(colors)replaces (and if needed extends) the color style part’s cycle for all extended chart types: treemap/sunburst category colors, box & whisker and histogram series, funnel and Pareto colors — bars and legend alike.ChartEx$set_region_map_colors(min, max, mid)sets a region map’s two- or three-color scale via the series’cx:valueColors.Chart options newly covered: trendline
forward/backward/intercept,error_bars$axis("x"error bars on scatter charts),invert_if_negativefor bar series, andsize_represents("area"/"w") inset_bubble_options().
Fixes
error_bars$directionwas documented but ignored (always"both"); it is now written toerrBarType.ChartEx per-point colors were written as
cx:dPtand ignored by Excel; the correct element iscx:dataPt, so passing a color vector (e.g. a corporate palette) toadd_series()now colors extended charts the same way it colors standard charts.Legend settings that are valid for standard charts no longer produce broken ChartEx XML:
pos = "tr"maps to"t"and side-stylealignvalues map onto the chartexmin/ctr/maxenum.ChartEx axes emitted
cx:spPrbefore the gridline/tick/label elements;CT_Axisplaces it aftertickLabelsandnumFmt. Excel tolerated the old order, but SDK-based validation (e.g. OOXMLValidator) flags it. Output changes for chartex axes: identical elements, schema order. A structural chartex validator driven by the Open XML SDK schema data ships ininst/tools/cx_structure_check.py.Color name resolution is delegated to
openxlsx2::wb_color()instead of a separate implementation.
