How to: |
Using the chart type "pictogram", you can use images as markers on the chart. The chart consists of bars, for each series, that are comprised of either repeated images that are stacked to the height of the bar or a single image that is stretched or shrunk to represent the height of the bar. The image for each series is specified in the marker:shape property as either a URL reference or a standard marker shape.
*GRAPH_JS "chartType": "pictogram", "pictogramProperties": { "fillMode": "string", "backFill": "string", "lockToGrid": boolean }, "series": [ { "series": number, "color": "string", "marker": { "shape": "string", "color": "string", "border": {"width": number, "color": "string"} } } ]
where:
Defines the properties of the pictogram images.
Controls how each bar is filled. Valid values are:
Defines a color specification string to use with a standard marker shape and the property "fillMode": "repeatClip". It repeats the marker shape all the way to the top of the axis space instead of to the height of the bar, but fills the markers above the height of the bar with this color. The default value is "undefined".
If true, shrinks the chart so that exactly one pictogram glyph fits between each y-axis gridline. The default value is false.
Defines the properties of the series that will be represented by the images.
Is the number of the series to be represented by the pictogram.
Is a color specification string for the series. To see the pictograms without the series bars, use the property "color": "transparent".
Defines the properties of the marker for the series.
Can be either a URL reference to an image file, or a standard marker shape. A URL reference must be in the following format.
"url(url_to_image_file)"
Image types supported include .gif, .jpg, .png, and .svg.
Defines the color for the marker when it is a standard marker shape. This property is ignored for an image file.
Defines the width in pixels and a color specification string for the marker border. Border properties are ignored when the marker shape is an image file.
The following request uses a repeated quilt block image to generate the bars on the chart.
GRAPH FILE WF_RETAIL_LITE SUM COGS_US BY PRODUCT_CATEGORY ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET STYLE * type=data, column=N1, bucket=x-axis, $ type=data, column=n2, bucket=y-axis, $ INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$ *GRAPH_JS "chartType": "pictogram", "pictogramProperties": { "fillMode": "repeatClip", "backFill": "undefined", }, "series": [{ "series": 0, "color": "transparent", "marker": { "shape": "url(http://ecl.informationbuilders.com/jschart/quilt.gif)", "color": "undefined", "border": {"width": 1, "color": "#DDDDDD"} } }] *END ENDSTYLE END
The output is shown in the following image.
The following request uses a stretched image file to generate the bars on the chart.
GRAPH FILE WF_RETAIL_LITE SUM COGS_US BY PRODUCT_CATEGORY ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET STYLE * type=data, column=N1, bucket=x-axis, $ type=data, column=n2, bucket=y-axis, $ INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$ *GRAPH_JS_FINAL "chartType": "pictogram", "pictogramProperties": { "fillMode": "stretch", "backFill": "undefined", }, "series": [{ "series": 0, "color": "transparent", "marker": { "shape": "url(http://ecl.informationbuilders.com/jschart/pencil.gif)", "color": "red", "border": {"width": 1, "color": "#DDDDDD"} } }] *END ENDSTYLE END
The output is shown in the following image.
The following request uses the fivestar maker shape with light gray backfill to generate the chart.
GRAPH FILE MOVIES SUM COPIES BY RATING ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET STYLE * type=data, column=N1, bucket=x-axis, $ type=data, column=n2, bucket=y-axis, $ INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$ *GRAPH_JS "chartType": "pictogram", "pictogramProperties": { "fillMode": "repeatClip", "backFill": "lightgray", }, "series": [{ "series": 0, "color": "transparent", "marker": { "shape": "fivestar", "color": "gold", "border": {"width": 1, "color": "#FECF01"} } }] *END ENDSTYLE END
The output is shown in the following image.
WebFOCUS | |
Feedback |