fpspreadsheet: xlsx chart writer supports axis gridlines.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9196 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
65e4ef2636
commit
c7f8ce5f38
@ -3404,6 +3404,25 @@ procedure TsSpreadOOXMLChartWriter.WriteChartAxisNode(AStream: TStream;
|
||||
Result := 'cross';
|
||||
end;
|
||||
|
||||
function GetGridLineStr(AIndent: Integer; ANodeName: String; ALine: TsChartLine): String;
|
||||
var
|
||||
indent: String;
|
||||
begin
|
||||
if ALine.Style <> clsNoLine then
|
||||
begin
|
||||
indent := DupeString(' ', AIndent);
|
||||
Result := Format(
|
||||
indent + '<%0:s>' + LE +
|
||||
indent + ' <c:spPr>' + LE +
|
||||
'%s' + LE +
|
||||
indent + ' </c:spPr>' + LE +
|
||||
indent + '</%0:s>' + LE,
|
||||
[ ANodeName, GetChartLineXML(AIndent + 4, Axis.Chart, ALine) ]
|
||||
)
|
||||
end else
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
const
|
||||
AX_POS: array[TsChartAxisAlignment] of string = ('l', 't', 'r', 'b');
|
||||
var
|
||||
@ -3424,6 +3443,8 @@ begin
|
||||
indent + ' </c:scaling>' + LE +
|
||||
indent + ' <c:delete val="0"/>' + LE +
|
||||
indent + ' <c:axPos val="%s" />' + LE +
|
||||
GetGridLineStr(AIndent + 2, 'c:majorGridlines', Axis.MajorGridLines) +
|
||||
GetGridLineStr(AIndent + 2, 'c:minorGridlines', Axis.MinorGridLines) +
|
||||
indent + ' <c:numFmt formatCode="General" sourceLinked="1"/>' + LE +
|
||||
indent + ' <c:majorTickMark val="%s"/>' + LE +
|
||||
indent + ' <c:minorTickMark val="%s"/>' + LE +
|
||||
|
Loading…
Reference in New Issue
Block a user