Line Chart

A line chart or line graph displays the evolution of one or several numeric variables. Data points are connected by straight line segments. It is similar to a scatter plot except that the measurement points are ordered (typically by their x-axis value) and joined with straight line segments. A line chart is often used to visualize a trend in data over intervals of time – a time series – thus the line is often drawn chronologically. When several values are available for each time stamp, data can be aggregated and a confidence zone is generally added around the trend.



Color Themes


{
   "y" : {
      "data" : [
        [30,58,87,115,120,142,145],
        [33,69,111,156,172,203,203],
        [30,51,75,108,115,139,140],
        [32,62,112,167,179,209,214],
        [30,49,81,125,142,174,177]
      ],
      "smps" : [118,484,664,1004,1231,1372,1582],
      "vars" : [1,2,3,4,5]
   }
}
{
   "background":"rgb(226,236,248)",
   "backgroundType":"window",
   "blockContrast":"true",
   "evenColor":"rgb(226,236,248)",
   "graphOrientation":"vertical",
   "graphType":"Line",
   "legendInside":"true",
   "legendKeyBackgroundBorderColor":"rgba(0,0,0,0)",
   "legendKeyBackgroundColor":"rgba(0,0,0,0)",
   "legendPosition":"bottomRight",
   "smpLabelRotate":"90",
   "smpTitle":"Days Old",
   "theme":"GGPlot",
   "title":"Growth of Orange Trees",
   "xAxisTitle":"Circumference (mm)"
}
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/cX-oranges-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  background="rgb(226,236,248)",
  backgroundType="window",
  blockContrast=TRUE,
  evenColor="rgb(226,236,248)",
  graphOrientation="vertical",
  graphType="Line",
  legendInside=TRUE,
  legendKeyBackgroundBorderColor="rgba(0,0,0,0)",
  legendKeyBackgroundColor="rgba(0,0,0,0)",
  legendPosition="bottomRight",
  smpLabelRotate=90,
  smpTitle="Days Old",
  theme="GGPlot",
  title="Growth of Orange Trees",
  xAxisTitle="Circumference (mm)"
)