Customizing Charts, Graphs and Maps Using PCScript - PowerPoint PPT Presentation

1 / 53
About This Presentation
Title:

Customizing Charts, Graphs and Maps Using PCScript

Description:

1. Customizing Charts, Graphs and Maps. Using PCScript. Mardell Cheney. 2. The Outline ... An object oriented scripting language similar to JavaScript but the ... – PowerPoint PPT presentation

Number of Views:138
Avg rating:3.0/5.0
Slides: 54
Provided by: cor69
Category:

less

Transcript and Presenter's Notes

Title: Customizing Charts, Graphs and Maps Using PCScript


1
Customizing Charts, Graphs and MapsUsing PCScript
  • Mardell Cheney

October 3, 2009
1
2
The Outline
  • PCScript What is it, and why use it?
  • PCScript general
  • PCScript graph
  • PCScript map
  • PCScript gauge
  • PCScript textboxes and shapes
  • Questions

October 3, 2009
2
3
PCScript
  • What is it?
  • Presentation Control Script
  • An object oriented scripting language similar to
    JavaScript but the objects only have methods, no
    attributes
  • Why is it still around if everything is
    XML-based?
  • Excellent for quick customizations
  • Less verbose for things like custom drilldown and
    hover
  • Independent of underlying XML format

October 3, 2009
3
4
Documentation now in Wiki
  • Corda Documentation is now in a Wiki
  • Go To http//wiki.corda.com
  • Links for different Wiki Spaces on left
  • CenterView 3.1 Documentation
  • Corda 7.2 Documentation
  • Tutorials
  • Wiki Information
  • More will be added
  • You can sign up to add or edit content.

October 3, 2009
4
5
PCScript - main
  • addITXML
  • message
  • itemDelimiter
  • paramDelimiter
  • description
  • suppressAutoDescription
  • title

October 3, 2009
5
6
PCScript main.addITXML
  • addITXML add additional ITXML at main level
  • main.addITXML(ltcittextbox name"textbox"
    positioned-in-builder"true" common"top5left51
    width393height24"gt ltcittext content"Monthly
    Revenue"/gt ltcittextbox-settings
    show-border"false" fill-enabled"false"
    font"size16stylebold"/gtlt/cittextboxgt)

October 3, 2009
6
7
PCScript main.addITXML
October 3, 2009
7
8
PCScript main.message
  • message ignore contents of image template and
    only display the Message instead.
  • main.message(This message replaces all contents
    of the image template)

October 3, 2009
8
9
PCScript main.message
October 3, 2009
9
10
PCScript - main
  • itemDelimiter change the itemDelimiter
    character
  • paramDelimiter change the paramDelimiter
    character
  • main.paramDelimiter()
  • main.itemDelimiter()
  • Twelve Months.setcategories(Bob and Betty Fred,
    and Wilma)
  • Twelve Months.setseries(Sales, for each
    month3329)
  • Twelve Months.addHoverText(11Bob and Betty's
    Sales)

October 3, 2009
10
11
PCScript - main
October 3, 2009
11
12
PCScript main (section 508)
  • description set the Chart description for dLink
  • suppressAutoDescription suppresses text
    description generation except for those things
    that are explicitly specified such as
    main.description and graph. description
  • title Specifies a title for the Corda Image in
    the generated text description.

October 3, 2009
12
13
PCScript main.description
  • description set the Chart description for dLink
  • main.description(Monthly Revenue)

October 3, 2009
13
14
PCScript main.description
October 3, 2009
14
15
PCScript all objects
  • addITXML Used to add to or change the XML
    definition of and Object.
  • setITXMLAttributes Used to set or change the
    XML attributes of an Object.
  • Example graph.setITXMLAttributes(common"top100l
    eft20width400")
  • hide Hides an object in the rendered output
  • show Makes an object visible (that is set to be
    hidden) in the rendered output

October 3, 2009
15
16
PCScript graph objects
  • addHoverText
  • addNote
  • addScaleMarker
  • dateInputFormat
  • ddEnable
  • ddPrefix
  • explodePieWedge
  • loadFile
  • numberOfLines
  • setCategories
  • setDataLabelFormat
  • setAttributes
  • setScale
  • setSeries
  • setSeriesNames
  • setSeriesStyle
  • setSeriesToSecondScale
  • setStockHLOCOrder
  • suppressAutoDescription
  • suppressDescriptionItem
  • targetCategory
  • transposed
  • useColorPalette

October 3, 2009
16
17
PCScript graph.addHoverText
  • addHoverText To add Hover text to one or more
    items
  • Twelve Months.setcategories(Jan Feb Mar Apr
    May Jun Jul Aug Sep Oct Nov Dec)
  • Twelve Months.setseries(Sales33294333324230
    3839457846)
  • Twelve Months.addHoverText(Nov,Sales,Wow Look at
    Nov)

October 3, 2009
17
18
PCScript graph.addNote
  • addNote - To add an always visible NOTE to one or
    more items
  • Twelve Months.setcategories(Jan Feb Mar Apr
    May Jun Jul Aug Sep Oct Nov Dec)
  • Twelve Months.setseries(Sales33294333324230
    3839455290)
  • Twelve Months.addNote(Dec,Sales,Wow Look at Dec)

October 3, 2009
18
19
PCScript graph.addScaleMarker
  • addScaleMarker Add a scale marker (line or
    range)
  • Twelve Months.addScaleMarker(value, line, 2,
    30,ff0000)
  • Twelve Months.addScaleMarker(value, range, 38,
    55,c0f0d0)

October 3, 2009
19
20
PCScript graph.ddEnable
  • ddEnable Set drilldown for one or more items
  • Twelve Months.ddEnable(1-99,1,http//www.corda.com
    /someapp?cat_CATEGORY_NAME)

October 3, 2009
20
21
PCScript graph.explodePieWedge
  • explodePieWedge specify series to explode and
    gap width
  • graph.explodePieWedge(3, 20)

October 3, 2009
21
22
PCScript graph.explodePieWedge
  • explodePieWedge Result
  • graph.explodePieWedge(Item 3, 20)

October 3, 2009
22
23
PCScript graph.numberOfLines
  • numberOfLines sets number of series to show as
    lines in line / bar combo graphs
  • graph.numberOfLines(2)

October 3, 2009
23
24
PCScript graph.numberOfLines
  • numberOfLines results
  • graph.numberOfLines(2)

October 3, 2009
24
25
PCScript graph.setCategories
  • setCategories used to set data and colors
  • graph.setcategories(Group 1 Group 2 Group 3)
  • graph.setseries(Item 1547585)
  • graph.setseries(Item 2926070)
  • graph.setseries(Item 3688737)

October 3, 2009
25
26
PCScript graph.setCategories
  • setCategories used to set data and colors
  • graph.setcategories(Group 1(CLR_ff0000)Group 2
    Group 3)
  • graph.setseries(Item 1547585)
  • graph.setseries(Item 2926070)
  • graph.setseries(Item 3688737)

October 3, 2009
26
27
PCScript graph.setSeries
  • setSeries - used to set data and colors
  • graph.setcategories(Group 1 Group 2 Group 3)
  • graph.setseries(Item 1547585)
  • graph.setseries((CLR_ff0000)Item 2926070)
  • graph.setseries(Item 3688737)

October 3, 2009
27
28
PCScript graph.setSeries
  • setSeries - used to set data and colors
  • graph.setcategories(Group 1 Group 2 Group 3)
  • graph.setseries(Item 1547585)
  • graph.setseries(Item 2926070)
  • graph.setseries(Item 368 (CLR_ff0000)8737)

October 3, 2009
28
29
PCScript graph.setAttributes
  • setAttributes set color or symbol type (line)
    for data item
  • graph.setAttributes(Group 1, Item 2, CLR_0000FF)

October 3, 2009
29
30
PCScript graph.setScale
  • setScale change some scale attributes
  • setScale(type, automanual, maxstartdate,
    minenddate, majorTicks)
  • graph.setScale(value, auto, 100, 20,5)

October 3, 2009
30
31
PCScript graph.useColorPalette
  • useColorPalette change to the named color
    palette
  • Twelve Months.useColorPalette(Olive Monochromatic)

October 3, 2009
31
32
PCScript graph.setSeriesStyle
  • setSeriesStyle change how a series looks in a
    line graph
  • graph.setSeriesStyle(SeriesName, lineWidth,
    symbolType, areaFill, bubbleType, lineStyle)
  • Twelve Months.setSeriesStyle(Sales, 3, 8, , ,
    dashed)
  • Twelve Months.setAttributes(1-99,Sales,SCLR_ff0000
    )

October 3, 2009
32
33
PCScript graph objects
  • dateInputFormat set date input (example
    m/d/Y)
  • ddPrefix When you have a long URL to prepend to
    all drilldown
  • loadFile Specify a local file to load data from
    to feed to graph
  • setDataLabelFormat set format string for data
    labels
  • (example _SERIES_NAME _VALUE)
  • setSeriesNames override the series names of
    data that is already loaded
  • setSeriesToSecondScale set a series to use
    second scale on dual scale graphs
  • setStockHLOCOrder Specify the column order for
    High, Low, Open, Close
  • Transposed allows you to transpose rows and
    columns after data is sent to graph

October 3, 2009
33
34
PCScript gauge
  • setGaugeValue
  • setGaugeRange
  • deleteAllRanges
  • deleteRange
  • setGaugeLabel
  • setGaugeMinMax

October 3, 2009
34
35
PCScript gauge.setGaugeValue
  • setGaugeValue set a value into a gauge
  • gauge.setGaugeValue(84,Network Load)

October 3, 2009
35
36
PCScript gauge.setGaugeRange
  • setGaugeRange set one or more gauge ranges
  • Vertical Classic.deleteAllRanges()
  • Vertical Classic.setGaugeRange(Green, 00ff00, 0,
    70Red, ff0000, 70, 100)
  • Vertical Classic.setGaugeValue(84,Network Load)

October 3, 2009
36
37
PCScript - gauge
  • deleteAllRanges remove all ranges (when adding
    new)
  • deleteRange remove a specific range
  • setGaugeLabel set the label text

October 3, 2009
37
38
PCScript - map
  • addLine
  • addPoint
  • deleteAllRanges
  • deleteRange
  • loadMapFile
  • setDrilldown
  • setHover
  • setLabel
  • setLookup
  • setMapDataColumns
  • setValues

October 3, 2009
38
39
PCScript map.setValues
  • setValues Set values into a map
  • US.setValues(State UT, 33California, 60)

October 3, 2009
39
40
PCScript map.setHover
  • setHover specify hover text for a map shape or
    point
  • US.setValues(State UT, 33California, 60)
  • US.setHover(StateUT,The state of _LONGNAME -
    _VALUE)

October 3, 2009
40
41
PCScript map.setDrilldown
  • setDrilldown set drilldown action for one or
    more
  • US.setValues(State UT, 33California, 60)
  • US.setHover(StateUT,The state of _LONGNAME -
    _VALUE)
  • US.setDrilldown(StateUT,http//www.corda.com/some
    app?state_NAME)

October 3, 2009
41
42
PCScript map.addPoint
  • addPoint add a point to the map by lat, long
    with value
  • US.addPoint(Four Corners, 36.9992,-109.045239,33)

October 3, 2009
42
43
PCScript map.addLine
  • addLine(srclat, srclong, destlat, destlong,
    color, width, style, hover, drilldown, target)
  • US.addLine(36.9992,-109.045239,38.6,-90.2,
    ff0000, 3, solid, Four Corners to St. Louis)

October 3, 2009
43
44
PCScript - map
  • deleteAllRanges remove all ranges
  • deleteRange remove a specific range
  • loadMapFile load data from a file into Map
  • setLabel override that label for specified
    shapes or points
  • setLookup to set explicit name lookup instead
    of auto
  • setMapDataColumns specify which column contains
    map data

October 3, 2009
44
45
PCScript - shapes
  • addDescription used to describe shape in text
    description
  • addHoverText set Hover Text for a shape
  • ddEnable set drilldown target for a shape
  • setLabel set the shape label or text
  • setValue set the shape value

October 3, 2009
45
46
PCScript - textbox
  • setText Set the text for a Textbox
  • ddEnable Set drilldown target for a textbox
  • description set what will be shown in text
    description

October 3, 2009
46
47
PCScript - bitmap
  • ddEnable set drilldown target for a bitmap
    image
  • loadFile replace bitmap image with a local file
  • bitmap.loadFile(D/VE 2008/PCScript - 08/Water
    lilies_small.jpg)

October 3, 2009
47
48
PCScript dynamic.setITXMLAttributes
  • setITXMLAttributes set a file and target object
    to load
  • dynamic.setITXMLAttributes(file-nameUS.itxml'
    object-nameUS')

October 3, 2009
48
49
PCScript Using in CenterView
  • Building using Server Script
  • df datafunnel.get('datafunnels/USRoutes.dfxml')
  • pcscript 'main.paramdelimiter()'
  • for (i2i lt df.numRows() i)
  • destination 'request.destination'
    df.cell(i,8) 'request.lineColor'
    df.cell(i,5) 'request.lineWidth'
    df.cell(i,6)
  • drillUrl '' util.getDrill('update- kpilistR
    outeMap',destination,'','','')
  • pcscript 'dynamic.addline(' df.cell(i,1)
    '' df.cell(i,2) '' df.cell(i,3) ''
    df.cell(i,4) '' df.cell(i,5) ''
    df.cell(i,6) '' df.cell(i,7) ''
    df.cell(i,8) drillUrl ')'
  • pcscript 'main.paramdelimiter(,)back.hide()'

October 3, 2009
49
50
PCScript Using in CenterView
October 3, 2009
50
51
PCScript Using in CenterView
October 3, 2009
51
52
Additional Resources
  • CD
  • Corda Connection Visual Evolution 2008
  • Go to portal.corda.com
  • Login
  • Resources
  • Visual Evolution 2008
  • Attend ITXML session following this one
  • Meet me in the Lounge 100-200, 500 -530
  • Q A

53
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com