Some time ago I wrote a number of popfly blocks for the popfly team. They were release in the most recent build of popfly so I thought I would share them. Look me up under my user name 'pieseczek' to see more of the blocks I have put together such as (paypal, eval, math, datetime, strawpole, bargraph, photoshow and more) But first is the BarGraph block.
The popfly Bar Graph Control is a specific type of chart popfly block that can be used and bound to external data to generate a simple bar chart that can dynamicly generate a chart presentation with some animation and then can compiled and used in a popfly mash-up and placed on web pages.
If you use the default version added to the collection it is pretty straight forward but if you really want todo cool stuff rip it to your own version and then edit it to set other things like the title etc.
Here is a short list of the underlying API's (control members) on the control you can mess with:
api details and members
- Member: Height – Height of control UI.
- Member: Width – width of control UI.
- Member: HeightChop (private) – should be calculated based on bottom size of the HTML embedded WPFe object.
- Member: RootElement (private) - The XAML DOM of the control.
- Member: Title – text label at the top of the control UI.
- Member: Footer – text label at the bottom of the control UI.
- Member: ShowNumber – determines (either true of false) if numbers or labels are shown on above the bars.
- Member: ShowBarLabels – determine if labels should be shown (either true or false).
- Member: BackgroundImage – gives a path to a background image. If left blank then the default background is used.
- Member: TextColor – determines the color of the text used in labels.
- Member: YAxisLabel – text for use on the y axis.
- Member: Delimiter – Delimiter character expected separating insert data.
- Member: DelimiterState – used for data input using the bar class.
- Member: BarHoverColor – text value color code.
- Member: BarClickColor – text value color code.
- Member: FontFamily – font family for all labels and text.
- Member: FontWeight – font weight for all labels and text.
- Member: FontSize – font size for all labels and text.
- Member: ControlCanvasName – name of the Canvas that is the chart control.
- Member: AfterClickForeColor – color of text labels after a click event has occurred.
- Member: LabelHighlightColor – color of text labels during a highlight operations.
- Member: LabelDownClickColor – color of text labels when the mouse is down over the label.
- Member: TestMode – determines if text data should be used.
- Member: BarWidth (private) - Actual width of given bars.
- Member: BarStart (private) – should be private. Used to determine where the bars start on the canvas
- Member: DataArray[] – actual data used or bound to
- Member: _DataArray – freeze dried version of DataArray.
- Member: DataEffectiveArray[] – conversion of DataArray used for UI generation
- Member: ColorArray[] – array of colors for the bars to use.
- Member: _ColorArray – freeze dried version of ColorArray.
- Member: LinkArray[] – array of links or urls that each bar should goto.
- Member: _LinkArray – freeze dried version of LinkArray.
- Member: MaxFrameRate – setting on base object.
- Member: AnimationSpeedRation – sets the speed ratio for all animations
- Member: AnimationDuration – sets the duration for all chart render animations
- Member: ShowRulerAnimation – determines if the ruler animation is used one chart rendering.
- Member: XAML – is the path to the zaml file that has the control reference.
- Member: ErrorHandler – used by the initialization function to set the top level WPFe error handler.
- Event/Method: addBar( _bar ) – sets a data element onto the graph data stack of the control.
- Event/Method: initialize() – used to set up the control for Springfield.
- Event/Method: Constructor() – the graph constructor
- Event/Method: RefreshChart() – redraws the chart with current data.
- Event/Method: BarClick() – pulls the index of the bar to determine which url to launch..
- Event/Method: LabelClick() – pulls the index of the bar to determine which url to launch and does visual changes to links to perform link effects.
- Event/Method: BarLabel( indexer, text, width, left, top ) – A private method that creates a zaml textblock object and adds it to the text canvas
- Event/Method: SetTestData() – sets data arrays with test data.
- Event/Method: RefreshData() – refreshs the data.
- Event/Method: Ruler(Indexer, Factor) – draws a ruler line on the chart.
- ReflectionBar( Indexer, FillerColor, BarXPostion, EffHeight ) – creates Zaml reflection bar object and adds to the control UI.
- ElementBar( Indexer, FillerColor, BarXPostion, EffHeight ) – creates Zaml chart bar and adds it to the control UI.