This function creates a simple bar to display the contest between two different values. It is ideal for comparing two sets of data such as KPIs for and against or successful actions vs unsuccessful ones.
Basic format: "content_name": ["create_contest_bar", "content_title", "success_value", "failure_value", "location_id", "width", "height", ["color1", "color2"] , "href_link"]
e.g: "content_funcs_contest": ["create_contest_bar", "Contest Example", 66, 33, "#A5", 400, 50, ["red", "blue"]
or stack them to create a head-to-head style visualisation like this:
, "contest_possession": ["create_contest_bar", "Possession", "clip_total", "clip_total", "#A2", "", 30]
, "contest_shots": ["create_contest_bar", "Shots", "clip_total", "clip_total", "#A2", "", 30]
, "contest_shots_on_t": ["create_contest_bar", "Shots on Target", "clip_total", "clip_total", "#A2", "", 30]
, "contest_xG": ["create_contest_bar", "xG", "clip_total", "clip_total+2000", "#A2", "", 30]
Infact possession is oftentimes represented as a % of home vs away which can be done with the create_possession_bar function as seen on the next page...