PUT /documents/<documentID>/reports/<reportID>/elements/<elementID>?unit=<unit>
Request body: the relevant parameters for the element you want to update. See Charts for a description of the Visualizations.
Response type: application/xml or application/json
The response is a message stating the success or failure of the request.
You can also update the axis expressions of a report element by using the following API:
PUT /documents/<documentID>/reports/<reportID>/elements/<elementID>/axes/<axisID>/expressions
PUT /documents/127/reports/1/elements/43
Request body:
<element type="Section"> <parentId>2</parentId> <content> <axes duplicateRowAggregation="true"> <axis role="Row"> <expressions> <formula dataType="String">=[Year]</formula> </expressions> </axis> </axes> </content> </element>
Response:
<success> <message>The resource of type "Report element" with identifier "43" has been successfully updated.</message> <id>43</id> </success>
Request body:
<element type="Cell"> <parentId>2</parentId> <size minimalWidth="4500" minimalHeight="675" autofitWidth="false" autofitHeight="true"/> <padding left="75" right="75" top="75" bottom="75"/> <content> <expression> <formula type="Text" dataType="Numeric">=Sum([Sales revenue])</formula> </expression> </content> </element>
Request body:
<element type="VTable"> <parentId>2</parentId> <position x="8888" y="4444" horizontalAnchorType="None" verticalAnchorType="None"/> <style> <border> <top thickness="None" rgb="#000000" style="None"/> <bottom thickness="None" rgb="#000000" style="None"/> <left thickness="None" rgb="#000000" style="None"/> <right thickness="None" rgb="#000000" style="None"/> </border> <background width="10" height="10"/> <alternateColor frequency="2" rgb="#fcfdfd"/> </style> </element>
Request body:
<element type="PageZone"> <id>1</id> <size minimalHeight="8888"/> <hide always="true"/> <style> <border> <top thickness="Thin" rgb="#ff0000" style="Dotted"/> <bottom thickness="Thin" rgb="#ff0000" style="Dotted"/> <left thickness="Thin" rgb="#ff0000" style="Dotted"/> <right thickness="Thin" rgb="#ff0000" style="Dotted"/> </border> <background> <skin>Curve</skin> </background> </style> </element>
Request body:
<element type="Visualization"> <parentId>2</parentId> <size minimalWidth="10.84" minimalHeight="6.26"/> <position x="0.2" y="0.2"/> <style> <border> <top thickness="None" rgb="#000000" style="None"/> <bottom thickness="None" rgb="#000000" style="None"/> <left thickness="None" rgb="#000000" style="None"/> <right thickness="None" rgb="#000000" style="None"/> </border> <background> <gradient orientation="Horizontal"> <start alpha="255" rgb="#ffff00"/> <end alpha="255" rgb="#ff00ff"/> </gradient> </background> </style> <content> <chart type="TagCloud"> <layout showDimensionsWithEmptyMeasureValues="true" showDimensionsWithMeasuresEqualToZero="true" showDimensionsWithSumOfMeasuresEqualToZero="true" showMeasuresWithEmptyDimensionValues="false" showParentNodes="true" duplicateRowAggregation="true"/> <title visible="true"> <style> <border thickness="None"> <color rgb="#000000" alpha="255"/> </border> <background> <color rgb="#000000" alpha="0"/> </background> <font size="9" face="Arial" italic="false" bold="true" strikethrough="false" underline="false" rgb="#000000"/> <alignment horizontal="Left" vertical="Center" textPolicy="Truncate"/> </style> <label dataType="String">="Tag Cloud"</label> <layout location="Top" orientation="Auto" spacing="2" adjust="false"/> </title> <legend visible="true"> <style> <border thickness="None"> <color rgb="#000000" alpha="0"/> </border> <background> <color rgb="#000000" alpha="0"/> </background> <font size="8" face="Arial" italic="false" bold="true" strikethrough="false" underline="false" rgb="#707070"/> <alignment horizontal="Left" vertical="Center" textPolicy="Wrap"/> </style> <title visible="true"> <style> <border thickness="None"> <color rgb="#000000" alpha="255"/> </border> <background> <color rgb="#000000" alpha="0"/> </background> <font size="8" face="Arial" italic="false" bold="true" strikethrough="false" underline="false" rgb="#000000"/> <alignment horizontal="Left" vertical="Center" textPolicy="Truncate"/> </style> <layout orientation="Auto" spacing="2"/> </title> <layout groupByDimension="false" symbolSize="9" location="Right" orientation="Auto" spacing="4" adjust="false"/> <extraInfo visible="true"> <font size="10" face="Arial" italic="false" bold="false" strikethrough="false" underline="false" rgb="#7070ff"/> </extraInfo> </legend> <plotArea> <tagCloudSeries levelColoring="45" comparator="Weight" mode="Wordle" orientation="HorizontalAndVertical" fillRate="0.65" spacingBetweenTags="Fixed" spacingValue="0.0"> <tag maxFontRatio="Fixed" maxFontSize="8" minFontRatio="Fixed" minFontSize="4" minVisibleFontSize="4" fontScaling="Logarithmic"> <font size="6" face="Arial" italic="false" bold="true" strikethrough="false" underline="false" rgb="#555555"/> </tag> </tagCloudSeries> </plotArea> <graphics> <coloring> <palettes> <palette alpha="50" refId="red" /> </palettes> <tagCloudSeries method="CustomRange"> <outOfRange> <color rgb="#c0c0c0" alpha="117"/> </outOfRange> <nullOrEmpty> <color rgb="#e0e0e0" alpha="125"/> </nullOrEmpty> <data distributionMode="ByQuantiles" intervalSyntax="US"/> <ranges percentage="true"> <range from="0.0" to="33.0"> <color rgb="#ff0000" alpha="255"/> </range> <range from="33.0" to="67.0"> <color rgb="#000000" alpha="255"/> </range> <range from="67.0" to="100.0"> <color rgb="#00ff00" alpha="255"/> </range> </ranges> </tagCloudSeries> </coloring> <rendering filter="None"> <shadow xOffset="0.0" yOffset="0.0" filterPassCount="3" filterWindowSize="5" lightPower="0.3"> <color rgb="#9d9d9d" alpha="187"/> </shadow> </rendering> </graphics> <axes> <axis role="Category" optional="false"> <id>0</id> <name>Tags Name</name> <expressions> <formula dataType="String" dataObjectId="DP0.DO5">=[Service]</formula> </expressions> </axis> <axis role="TagsWeight" optional="false"> <id>1</id> <name>Tags Weight</name> <expressions> <formula polarity="Auto" dataType="Numeric" dataObjectId="DP0.DO7">=[Revenue]</formula> </expressions> </axis> <axis role="TagsFamily" optional="true"> <id>2</id> <name>Tags Family</name> <expressions> <formula polarity="Auto" dataType="Numeric" dataObjectId="DP0.DO25">=[Future guests]</formula> </expressions> </axis> </axes> </chart> </content> </element>