Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Template:Tesla revenue
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{ // // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:Lines // Please do not modify it anywhere else, as it may get copied and override your changes. // Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:Lines // // Template translation is in https://commons.wikimedia.org/wiki/Data:Original/Template:Graphs.tab // "version": 2, "width": 400, "height": 300, "padding": "strict", "signals": [{"name": "rightwidth", "expr": "width + padding.right", "init":"400"}], "data": [{ "name": "chart", "url": "tabular:///bls.gov/US Women's weekly earnings as a percent of men's by age, annual averages.tab", "format": {"type": "json" , "property": "data" }, "transform": [ // Convert xField parameter into a field "_xfield" {"type": "formula", "field": "_xfield", "expr": "datetime(datum.year, 0, 1)" } , {"type": "sort", "by": ["_xfield"]} , {"type": "fold", "fields": ["age_16_24", "age_25_34", "age_35_44", "age_45_54"]} , {"type": "formula", "field": "_yfield", "expr": "datum.value" } ] }, // source of labels for `tabletype=tab` { "name": "labels", "url": "tabular:///bls.gov/US Women's weekly earnings as a percent of men's by age, annual averages.tab", "format": {"type": "json", "property": "fields"}, "transform": [ ] }, ], "scales": [ { "name": "x", "type": "time", "domain": {"data": "chart", "field": "_xfield"}, "range": "width", }, { "name": "y", "type": "linear", "range": "height", "domain": {"data": "chart", "field": "_yfield"}, "zero": false, "domainMin": 50, "domainMax": 100, }, { "name": "color", "type": "ordinal", "range": "category10", "domain": {"data": "chart", "field": "key"} }, { "name": "labels", "type": "ordinal", "domain": {"data": "labels", "field": "name"}, "range": {"data": "labels", "field": "title"}, } ], "axes": [ { "scale": "x", "type": "x", "tickSizeEnd": 0, "ticks": 7, "properties": { "labels": { } } }, { "scale": "y", "type": "y", "tickSizeEnd": 0, "properties": { "labels": { } } } ], "marks": [ // Group data by the group parameter or "key", and draw lines, one line per group { "type": "group", "from": { "data": "chart", "transform": [{"type": "facet", "groupby": ["key"]}] }, "marks": [ { "type": "line", "properties": { "hover": { "stroke": {"value": "red"} }, "update": { "stroke": {"scale": "color", "field": "key"} }, "enter": { "y": {"scale": "y", "field": "_yfield"}, "x": {"scale": "x", "field": "_xfield"}, "stroke": {"scale": "color", "field": "key"}, "interpolate": {"value": "linear"}, "strokeWidth": {"value": 2.5} } } } ], }, ] }
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)