mock_table_data <- function(cursor = 'null') {
mock_data <- "{\"data\":
[[329252033,1546300800067,3832.6286242,0.004,1],
[329252034,1546300800258,3832.7,0.06526649,1],
[329252035,1546300800261,3834.7,0.27273351,1],
[329252043,1546300803806,3832.6286242,0.0714,1],
[329252068,1546300820415,3832.6286242,0.01327,1],
[329252069,1546300821097,3832.7,0.02631075,1],
[329252070,1546300821101,3833.9,0.22783455,1],
[329252071,1546300821265,3833.6,0.06522902,1],
[329252072,1546300821269,3833.9,0.77216545,1]],
\"columns\":[{\"name\":\"Trade ID\",\"code\":\"id\",\"type\":\"int64\"},
{\"name\":\"Timestamp\",\"code\":\"time\",\"type\":\"datetime\"},
{\"name\":\"Price\",\"code\":\"price\",\"type\":\"float64\"},
{\"name\":\"Amount\",\"code\":\"amount\",\"type\":\"float64\"},
{\"name\":\"Sell\",\"code\":\"sell\",\"type\":\"boolean\"}],
\"cursor\":\"#cursor\"
}"
mock_data <- gsub("\"#cursor\"", cursor, mock_data)
return(mock_data)
}
mock_empty_table_data <- function() {
mock_data <- "{\"data\": [],
\"columns\":[{\"name\":\"Trade ID\",\"code\":\"id\",\"type\":\"int64\"},
{\"name\":\"Timestamp\",\"code\":\"time\",\"type\":\"datetime\"},
{\"name\":\"Price\",\"code\":\"price\",\"type\":\"float64\"},
{\"name\":\"Amount\",\"code\":\"amount\",\"type\":\"float64\"},
{\"name\":\"Sell\",\"code\":\"sell\",\"type\":\"boolean\"}],
\"cursor\": \"\"
}"
return(mock_data)
}
mock_table_data_extra_columns <- function() {
mock_data <- "{\"data\":
[[13000000000,\"2016-07-21 13:03:18 +0000\"],
[45000000000,\"2016-07-19 11:32:52 +0000\"],
[20000000000,\"2016-07-19 11:32:52 +0000\"],
[37000000000,\"2016-07-18 11:32:56 +0000\"],
[32000000000,\"2016-07-18 11:32:56 +0000\"],
[12000000000,\"2016-07-13 13:03:07 +0000\"],
[20000000000,\"2016-07-12 13:03:09 +0000\"],
[45000000000,\"2016-07-12 11:32:51 +0000\"],
[24000000000,\"2016-07-11 13:02:50 +0000\"],
[37000000000,\"2016-07-11 11:32:59 +0000\"],
[32000000000,\"2016-07-11 11:32:59 +0000\"],
[45000000000,\"2016-07-05 13:03:22 +0000\"],
[34000000000,\"2016-07-05 11:33:04 +0000\"],
[29000000000,\"2016-07-05 11:33:04 +0000\"],
[50000000000,\"2016-06-28 11:33:10 +0000\"],
[31000000000,\"2016-06-27 11:33:19 +0000\"],
[26000000000,\"2016-06-27 11:33:19 +0000\"],
[28000000000,\"2016-06-22 13:03:15 +0000\"],
[5000000000,\"2016-06-22 11:34:08 +0000\"],
[13000000000,\"2016-06-22 11:33:12 +0000\"]],
\"columns\":[{\"name\":\"offeringamount\",\"code\":\"amount\",\"type\":\"float64\"},
{\"name\":\"updatedtimestamp\",\"code\":\"time\",\"type\":\"datetime\"}],
\"cursor\": \"\"
}"
return(mock_data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.