A free points management plugin for WordPress.
myCRED Logo
myCRED Logo
  • Chapters
    • Chapter I – Introduction
    • Chapter II – Getting Started
    • Chapter III – Add-ons
    • Chapter IV – Premium Add-ons
    • Chapter V – For Developers
    • Chapter VI – Reference Guides
  • Categories
    • Actions
    • Classes
    • Constants
    • Filters
    • Functions
    • Objects
    • Shortcodes
    • Hooks
    • Template Tags
  • Packages
    • mycred/api
    • mycred/badge
    • mycred/balance
    • mycred/banking
    • mycred/content
    • mycred/core
    • mycred/coupon
    • mycred/email
    • mycred/game
    • mycred/log
    • mycred/notice
    • mycred/payment
    • mycred/purchase
    • mycred/rank
    • mycred/transfer
  • Store
  • Download
    Navigation
    • Loading navigation ...
    All Shortcodes
    myCRED shortcodes
    1. mycred_affiliate_id
    2. mycred_affiliate_link
    3. mycred_all_scratch_cards
    4. mycred_badges
    5. mycred_best_user
    6. mycred_buy
    7. mycred_buy_form
    8. mycred_buy_pending
    9. mycred_chart_balance_history
    10. mycred_chart_circulation
    11. mycred_chart_gain_loss
    12. mycred_chart_history
    13. mycred_chart_instance_history
    14. mycred_chart_top_balances
    15. mycred_chart_top_instances
    16. mycred_content_buyer_avatars
    17. mycred_content_buyer_count
    18. mycred_content_sale_count
    19. mycred_email_subscriptions
    20. mycred_exchange
    21. mycred_give
    22. mycred_hide_if
    23. mycred_history
    24. mycred_hook_table
    25. mycred_leaderboard
    26. mycred_link
    27. mycred_list_ranks
    28. mycred_load_coupon
    29. mycred_lotteries
    30. mycred_lottery
    31. mycred_lottery_jackpot
    32. mycred_lottery_quickpick
    33. mycred_lottery_results
    34. mycred_lottery_winnings
    35. mycred_my_badges
    36. mycred_my_balance
    37. mycred_my_rank
    38. mycred_my_ranks
    39. mycred_my_transfer_fee
    40. mycred_paymentwall
    41. mycred_pending_transfers
    42. mycred_rank_progress
    43. mycred_sales_history
    44. mycred_scratch_cards
    45. mycred_scratch_cards_remaining
    46. mycred_scratch_history
    47. mycred_sell_this
    48. mycred_sell_this_ajax
    49. mycred_send
    50. mycred_show_if
    51. mycred_stripe_buy
    52. mycred_stripe_subscribe
    53. mycred_stripe_subscription
    54. mycred_total_balance
    55. mycred_total_points
    56. mycred_total_since
    57. mycred_transfer
    58. mycred_users_of_all_ranks
    59. mycred_users_of_rank
    60. mycred_video
    Categories
    Filter by category
    1. Actions
    2. Classes
    3. Filters
    4. Functions
    5. Hooks
    6. Objects
    7. Shortcodes
    8. Template Tags
    Chapters
    Documentation
    1. Chapter I - Introduction
    2. Chapter II - Getting Started
    3. Chapter III - Add-ons
    4. Chapter IV - Premium Add-ons
    5. Chapter V - For Developers
    6. Chapter VI - Reference Guides
mycred_chart_history

Codex / mycred/stats / Shortcodes / mycred_chart_history

Description

This shortcode will render the average amount of points that has been awarded on your website for a given period. You can select how far back the chart should go in days, weeks, months or years. Uses Chart.js 2.7.0

Available since version 1.8

Shortcode Attributes

Attribute Type Required Default Description
type string No line The chart type to render. Supports: line and bar
ctype string No mycred_default The point type we want to show data for. Should only be used when you need to show data for a custom point type.
period string No days The type of periods we want to use. Accepts days, weeks, months and years.
number int No 10 The number of periods to show in the chart e.g. 10 days or 12 months.
order string No DESC The order of which the periods should be sorted.
title string No - Option to set a title for the chart.
animate int No 1 If the chart should be animated (1) or not (0).
bezier int No 1 If line charts should use bezier curves (1) or not (0).
labels int No 1 If labels should be shown in the chart (1) or not (0). Not all chart types use labels, it is mainly for bar and line charts where we have both an x and y axis.
legend int No 1 If a legend should be shown in the chart (1) or not (0). Not all charts show legends.
width string No - The chart canvas width. By default the chart will render full with of the container where the shortcode is used. Can be either a pixel value (without px) or a percentage value (with %).
height string No - The chart canvas height. Can be either a pixel value (without px) or a percentage value (with %).

CSS Styling

.chart-container mycred-chart-container { }
.chart-container mycred-chart-container canvas.mycred-chart-canvas { }
Example

Example 1: Default usage.

[mycred_chart_history]

Last edited October 15, 2017

About myCRED

myCRED is a free, open-source and developer friendly points management tool for WordPress powered websites.

Download Rate Plugin

Documentation

  • Add-ons
  • Core Shortcodes
  • F.A.Q.
  • Tutorials
  • Third Party Plugins
  • Code Snippets

Support

  • Product Licenses
  • Hire a Developer
  • Support Forums
  • Plugin Changelog
  • Contact

Copyright 2013 - 2018 Gabriel S Merovingi; All rights reserved. myCRED is licensed under GPL 2.0

Terms & Conditions • Use of Cookies • Store Policy • Community RulesHosted by One.com

myCRED Donations

Donate via PayPal

Donate via PayPal

Donate Bitcoin

myCRED Bitcoin Wallet

3LVrDPjgTkPfqGARXwAZW9cJBQEYo4FHsB

Suggest Codex Example

You can submit suggestions for codex examples that you have available as a public gist. If you are a member on the mycred.me website, you can earn Tokens for each submission. To claim these Tokens, make sure you provide your mycred.me username.

Please make sure the example you submit is relevant and if you include documentation, it's provided in English.