Template:Tesla revenue: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
{| class="wikitable"
 
|+Historic financials<ref>Source: Stockhub Limited</ref><ref group="Note" name="Note04" />
{
|-
  //
!Year
  // ATTENTION: This code is maintained at https://www.mediawiki.org/wiki/Template:Graph:Lines
!'''1''' !!'''2'''!!'''3'''!!'''4'''!!'''5'''
  //           Please do not modify it anywhere else, as it may get copied and override your changes.
!'''6'''
  //           Suggestions can be made at https://www.mediawiki.org/wiki/Template_talk:Graph:Lines
!'''7'''
  //
!'''8'''
  // Template translation is in https://commons.wikimedia.org/wiki/Data:Original/Template:Graphs.tab
!'''9'''
  //
!'''10'''
 
!'''11'''
  "version": 2,
!'''12'''
  "width": 400,
!'''13'''
  "height": 300,
!'''14'''
"padding": "strict",
!'''15'''
  "signals": [{"name": "rightwidth", "expr": "width + padding.right", "init":"400"}],
!'''16'''
  "data": [{
!'''17'''
    "name": "chart",
|-
    "url": "tabular:///bls.gov/US Women's weekly earnings as a percent of men's by age, annual averages.tab",
|'''Year end date'''||'''31/12/2005'''||'''31/12/2006<ref name=":12">{{cite web|url=https://www.mercurynews.com/2014/07/14/2006-san-carlos-start-up-tesla-seeks-sexier-electric-car/|title=2006: San Carlos start-up Tesla seeks sexier electric car|date=July 14, 2014}}</ref><ref name="SEC">{{cite web | url=https://www.sec.gov/edgar/browse/?CIK=1318605 | title=Tesla, Inc. TSLA on Nasdaq | publisher=[[U.S. Securities and Exchange Commission]]}}</ref>'''||'''31/12/2007'''||'''31/12/2008'''||'''31/12/2009'''
    "format": {"type": "json"
|'''31/12/2010<ref name="SEC" />'''
      , "property": "data"
|'''31/12/2011<ref name="SEC" />'''
     
|'''31/12/2012<ref name="SEC" />'''
    },
|'''31/12/2013<ref name="SEC" />'''
    "transform": [
|'''31/12/2014<ref name="SEC" />'''
 
|'''31/12/2015<ref name="SEC" />'''
 
|'''31/12/2016<ref name="SEC" />'''
      // Convert xField parameter into a field "_xfield"
|'''31/12/2017<ref name="SEC" />'''
      {"type": "formula", "field": "_xfield", "expr":
|'''31/12/2018<ref name="SEC" />'''
"datetime(datum.year, 0, 1)"
|'''31/12/2019<ref name="SEC" />'''
      }
|'''31/12/2020<ref name="SEC" />'''
      , {"type": "sort", "by": ["_xfield"]}
|'''31/12/2021<ref name="SEC" />'''
, {"type": "fold", "fields": ["age_16_24", "age_25_34", "age_35_44", "age_45_54"]}
|-
, {"type": "formula", "field": "_yfield", "expr": "datum.value" }
| colspan="18" |<div style="text-align: center;">'''Income statement'''</div>
 
|-
    ]
|Revenues ($'million)|| 0||0||0.073||15||112
  },
|117
// source of labels for `tabletype=tab`
|204
  {
|413
    "name": "labels",
|2,013
    "url": "tabular:///bls.gov/US Women's weekly earnings as a percent of men's by age, annual averages.tab",
|3,198
    "format": {"type": "json", "property": "fields"},
|4,046
    "transform": [
|7,000
 
|11,759
 
|21,461
    ]
|24,578
  },
|31,536
 
|53,823
 
|-
 
|Net profits ($'million)||style="color: red;" |-12||style="color: red;" |-30||style="color: red;" |-78||style="color: red;" |-83|| style="color: red;" |−56
  ],
|style="color: red;" |−154
  "scales": [
|style="color: red;" |−254
    {
|style="color: red;" |−396
      "name": "x",
|style="color: red;" |−74
      "type": "time",
|style="color: red;" |−294
      "domain": {"data": "chart", "field": "_xfield"},
|style="color: red;" |−889
      "range": "width",
|style="color: red;" |−675
     
|style="color: red;" |−1,962
 
|style="color: red;" |−976
     
|style="color: red;" |−862
    },
|721
    {
|5,519
      "name": "y",
|-
      "type": "linear",
| colspan="18" |<div style="text-align: center;">'''Balance sheet'''</div>
      "range": "height",
|-
      "domain": {"data": "chart", "field": "_yfield"},
|Total assets<br />($'million)
      "zero": false,
|8
      "domainMin": 50,
|44
      "domainMax": 100,
|34
     
|52
    },
|130
    {
|386
      "name": "color",
|713
      "type": "ordinal",
|1,114
      "range": "category10",
|2,417
      "domain": {"data": "chart", "field": "key"}
|5,831
    },
|8,068
{
|22,664
      "name": "labels",
|28,655
      "type": "ordinal",
|29,740
"domain": {"data": "labels", "field": "name"},
|34,309
      "range": {"data": "labels", "field": "title"},
|52,148
    }
|62,131
  ],
|-
 
| colspan="18" |<div style="text-align: center;">'''Other'''</div>
  "axes": [
|-
    {
|Employees
      "scale": "x", "type": "x", "tickSizeEnd": 0,
|NA
      "ticks": 7,
|70
     
|268
     
|252
     
|514
      "properties": {
|899
        "labels": {
|1,417
         
|2,914
         
|5,859
        }
|10,161
      }
|13,058
    },
|17,782
    {
|37,543
      "scale": "y", "type": "y", "tickSizeEnd": 0,
|48,817
     
|48,016
     
|70,757
     
|99,290
     
|}
      "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}
            }
          }
        }
       
      ],
    },
 
 
 
 
 
  ]
}

Revision as of 00:39, 26 September 2022

{

 //
 // 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}
           }
         }
       }
       
     ],
   },



 ]

}