Related
I am trying to create a Status column which displays the progress of a multi stage approval flow.
This JSFiddle demonstrates how it should look:
I am now converting the HTML and CSS into the JSON required for column formatting.
All the conditional logic and colors are working, however it is not outputting the nested child elements.
The nested child elements (spans) are the 'arrows' at the end of each stage.
The column formatting therefore looks like this:
The associated HTML in browser developer tools console looks like this:
(you can see that the nested spans are not being output at all)
At first, I was wondering if nested children were allowed in JSON column formatting.
But I have seen other examples where people are using it (example), so that doesn't seem to be the issue.
Below is the JSON column formatting I am using.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"style":
{
"font-size": "16px"
},
"children":
[
{
"elmType": "div",
"txtContent": "Stage 01",
"style":
{
"float": "left",
"padding": "10px 30px 10px 40px",
"position": "relative",
"font-family": "Arial",
"background-color": "=if([$Stage1Person] == '', '#eee', '#aeffae')"
},
"children":
[
{
"elmType": "span",
"style":
{
"position": "absolute",
"top": "0",
"right": "-19px",
"width": "0",
"height": "0",
"border-top": "21px solid transparent",
"border-bottom": "20px solid transparent",
"z-index": "2",
"background-color": "=if([$Stage1Person] == '', '#eee', '#aeffae')"
}
}
]
},
{
"elmType": "div",
"txtContent": "Stage 02",
"style":
{
"float": "left",
"padding": "10px 30px 10px 40px",
"position": "relative",
"font-family": "Arial",
"background-color": "=if([$Stage2Person] == '', '#ffdcae', '#aeffae')"
},
"children":
[
{
"elmType": "span",
"style":
{
"position": "absolute",
"top": "0",
"right": "-19px",
"width": "0",
"height": "0",
"border-top": "21px solid transparent",
"border-bottom": "20px solid transparent",
"z-index": "2",
"background-color": "=if([$Stage2Person] == '', '#ffdcae', '#aeffae')"
}
}
]
},
{
"elmType": "div",
"txtContent": "Stage 03",
"style":
{
"float": "left",
"padding": "10px 30px 10px 40px",
"position": "relative",
"font-family": "Arial",
"background-color": "=if([$Stage3Person] == '', '#ffaeae', '#aeffae')"
},
"children":
[
{
"elmType": "span",
"style":
{
"position": "absolute",
"top": "0",
"right": "-19px",
"width": "0",
"height": "0",
"border-top": "21px solid transparent",
"border-bottom": "20px solid transparent",
"z-index": "2",
"background-color": "=if([$Stage3Person] == '', '#ffaeae', '#aeffae')"
}
}
]
}
]
}
Simplified JSON
Here is a more simplified version which also demonstrates how the nested CHILD elements are not being output as HTML:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"style":
{
"font-size": "16px"
},
"children":
[
{
"elmType": "div",
"txtContent": "Stage 01",
"style":
{
"float": "left",
"padding": "10px 30px 10px 40px",
"position": "relative",
"font-family": "Arial",
"background-color": "=if([$Stage1Person] == '', '#eee', '#aeffae')"
},
"children":
[
{
"elmType": "span",
"txtContent": "Stage 01 - CHILD"
}
]
},
{
"elmType": "div",
"txtContent": "Stage 02",
"style":
{
"float": "left",
"padding": "10px 30px 10px 40px",
"position": "relative",
"font-family": "Arial",
"background-color": "=if([$Stage2Person] == '', '#ffdcae', '#aeffae')"
},
"children":
[
{
"elmType": "span",
"txtContent": "Stage 02 - CHILD"
}
]
},
{
"elmType": "div",
"txtContent": "Stage 03",
"style":
{
"float": "left",
"padding": "10px 30px 10px 40px",
"position": "relative",
"font-family": "Arial",
"background-color": "=if([$Stage3Person] == '', '#ffaeae', '#aeffae')"
},
"children":
[
{
"elmType": "span",
"txtContent": "Stage 03 - CHILD"
}
]
}
]
}
I have two lists A and B. I've created a lookup column on B to get data from A (item # and item address). I want to customize the view when opening an item on list B. But I can't find a way to make the fields from A visible on B. I get
Failure: TEST_x0020_SHIPPING_x0020_ADDRES1 was not found on the data object.
I checked the name of the field and it's correct and contains data. Please check the attached image. Is there a way to get that information on that view?
Note: if I disable debug it shows nothing.
Thanks in advance!
JSONERROR
Update: The code I'm using on the Header comes from the MS official site https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-configuration
{
"debugMode": false,
"elmType": "div",
"attributes": {
"class": "ms-borderColor-neutralTertiary"
},
"style": {
"width": "99%",
"border-top-width": "0px",
"border-bottom-width": "1px",
"border-left-width": "0px",
"border-right-width": "0px",
"border-style": "solid",
"margin-bottom": "16px"
},
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"box-sizing": "border-box",
"align-items": "center"
},
"children": [
{
"elmType": "div",
"attributes": {
"iconName": "Devices3",
"class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-themePrimary",
"title": "Details"
},
"style": {
"flex": "none",
"padding": "0px",
"padding-left": "0px",
"height": "36px"
}
}
]
},
{
"elmType": "div",
"attributes": {
"class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24"
},
"style": {
"box-sizing": "border-box",
"width": "100%",
"text-align": "left",
"padding": "21px 12px",
"overflow": "hidden"
},
"children": [
{
"elmType": "div",
"txtContent": "='Store ' + [$TEST_x0020_SHIPPING_x0020_ADDRES1]"
}
]
}
]
}
tabulator version: 4.8
I've tried it for hours, but I am stuck.
The height of the column header isn't auto-adjusted in the header second line. So important text for a column is hidden.
So, if you have a very long header title like "Anzahl Böden" or "Tragkraft pro Boden" you only see the first word if your screen size is not big enough.
/* tabulator */
var locale_number_formatter = function(cell, formatterParams, onRendered){
var nf = new Intl.NumberFormat();
return nf.format( cell.getValue() );
}
function is_mobile() {
var is_mobile = true;
if ($(window).width() >= 768) {
is_mobile = false;
}
return is_mobile;
}
.is-hidden
{
display: none;
}
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {
white-space: normal !important;
text-overflow: clip;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/tabulator/4.8.4/css/tabulator.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tabulator/4.8.4/js/tabulator.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<h1>
Table test
</h1>
<div id="product-table-2371">
</div>
<div id="hidden-table-2371">
</div>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var cart_formatter_2371 = function(cell, formatterParams, onRendered) {
return '<button title="In den Warenkorb" class="button cart-table-button cart-table-button-2371 is-primary has-text-white is-size-7 modal-button" data-object-id="238" data-attribute-id="2371" data-variation-id="' + cell.getValue() + '" aria-haspopup="true" data-table-id="table_2371">Warenkorb</button>';
};
var responsive_layout_formatter_2371 = function(data) {
//data - an array of objects containing the column title and value for each cell
var table_data = [];
data.forEach(function(col) {
table_data.push({
'column': col.title,
celldata: col.value
});
});
var responsive_table_2371 = Tabulator.prototype.findTable("#hidden-table-2371")[0];
if (!responsive_table_2371) {
responsive_table_2371 = new Tabulator("#hidden-table-2371", {
tooltips: true,
autoColumns: true,
"headerVisible": false,
layout: 'fitColumns',
tooltipGenerationMode: "hover",
tooltipsHeader: true,
data: table_data
});
} else {
responsive_table_2371.clearData();
responsive_table_2371.clearFilter();
responsive_table_2371.setData(table_data);
}
//var table_html = responsive_table_2371.tabulator( "getHtml" );
var table_html = '';
return Object.keys(data).length ? table_html : "";
}
var cart_button_cell_click_2371 = function(e, cell) {
// dummy
};
var columns_json_2371 = [{
"title": "",
"tooltip": "",
"cssClass": "tabulator-header-row-level-2",
"columns": [{
"formatter": "plaintext",
"field": "no",
"title": "Nr.",
"hozAlign": "right",
"vertAlign": "middle",
"width": 60,
"resizable": false,
"responsive": 2
}, {
"field": "height",
"cssClass": "tabulator-col-height",
"title": "H\u00f6he",
"tooltip": "H\u00f6he in mm",
"sorter": "number",
"formatter": locale_number_formatter,
"titleFormatter": "textarea",
"variableHeight": true,
"hozAlign": "right",
"vertAlign": "middle",
"responsive": 2
}, {
"field": "length",
"cssClass": "tabulator-col-length",
"title": "L\u00e4nge",
"tooltip": "L\u00e4nge in mm",
"sorter": "number",
"formatter": locale_number_formatter,
"titleFormatter": "textarea",
"variableHeight": true,
"hozAlign": "right",
"vertAlign": "middle",
"responsive": 2
}, {
"field": "depth",
"cssClass": "tabulator-col-depth",
"title": "Tiefe",
"tooltip": "Tiefe in mm",
"sorter": "number",
"formatter": locale_number_formatter,
"titleFormatter": "textarea",
"variableHeight": true,
"hozAlign": "right",
"vertAlign": "middle",
"responsive": 2
}, {
"field": "lowershelf",
"cssClass": "tabulator-col-lowershelf",
"title": "Anzahl B\u00f6den",
"tooltip": "Anzahl der Fachb\u00f6den pro Regalfeld",
"sorter": "number",
"formatter": locale_number_formatter,
"titleFormatter": "textarea",
"variableHeight": true,
"hozAlign": "right",
"vertAlign": "middle",
"responsive": 2
}, {
"field": "tragkraft_pro_boden",
"cssClass": "tabulator-col-tragkraft_pro_boden",
"title": "Tragkraft pro Boden",
"tooltip": "Tragkraft pro Boden in kg",
"sorter": "string",
"formatter": "plaintext",
"titleFormatter": "textarea",
"variableHeight": true,
"hozAlign": "right",
"vertAlign": "middle",
"responsive": 2
}]
}, {
"title": "Grundregal",
"tooltip": "Hier steht das Grundregal",
"cssClass": "tabulator-header-row-level-2",
"columns": [{
"field": "sku",
"cssClass": "tabulator-col-sku",
"title": "Art.Nr.",
"tooltip": "Artikelnummer des Produkts",
"sorter": "alphanum",
"formatter": "plaintext",
"titleFormatter": "textarea",
"variableHeight": true,
"hozAlign": "right",
"vertAlign": "middle",
"responsive": 2
}, {
"field": "price",
"cssClass": "tabulator-col-price",
"title": "Preis",
"tooltip": "Produktpreis",
"sorter": "number",
"formatter": "money",
"titleFormatter": "textarea",
"variableHeight": true,
"formatterParams": {
"decimal": ",",
"thousand": ".",
"symbol": " \u20ac",
"symbolAfter": true,
"precision": "2"
},
"hozAlign": "right",
"vertAlign": "middle",
"responsive": 2
}, {
"field": "cart",
"formatter": cart_formatter_2371,
"cellClick": cart_button_cell_click_2371,
"hozAlign": "center",
"vertAlign": "middle",
"tooltip": "In den Warenkorb",
"title": "",
"cssClass": "tabulatur-background-price",
"headerSort": false,
"responsive": 2
}]
}, {
"title": "Anbauregal",
"tooltip": "Hier ist das Anbauregal",
"cssClass": "tabulator-header-row-level-2",
"columns": [{
"field": "sku_1",
"formatter": "plaintext",
"hozAlign": "center",
"vertAlign": "middle",
"sorter": "alphanum",
"title": "Art.Nr.",
"tooltip": "Artikelnummer des Produkts",
"cssClass": "tabulatur-background-anbauregal",
"responsive": 2
}, {
"field": "price_1",
"formatter": "money",
"hozAlign": "center",
"vertAlign": "middle",
"sorter": "number",
"title": "Preis",
"cssClass": "tabulatur-background-anbauregal",
"formatterParams": {
"decimal": ",",
"thousand": ".",
"symbol": " \u20ac",
"symbolAfter": true,
"precision": "2"
},
"responsive": 2
}, {
"field": "cart_1",
"formatter": cart_formatter_2371,
"cellClick": cart_button_cell_click_2371,
"hozAlign": "center",
"vertAlign": "middle",
"tooltip": "In den Warenkorb",
"title": "",
"cssClass": "tabulatur-background-anbauregal",
"headerSort": false,
"responsive": 2
}]
}];
var tabledata_2371 = [{
"height": "2000",
"length": "1000",
"depth": "300",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2626",
"price": "145",
"cart": "307831",
"sku_1": "S2646",
"price_1": "108.1",
"cart_1": "307847",
"no": 1
}, {
"height": "2000",
"length": "1000",
"depth": "400",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2627",
"price": "154.7",
"cart": "307832",
"sku_1": "S2647",
"price_1": "117.1",
"cart_1": "307848",
"no": 2
}, {
"height": "2000",
"length": "1000",
"depth": "500",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2628",
"price": "173.2",
"cart": "307833",
"sku_1": "S2648",
"price_1": "134.6",
"cart_1": "307849",
"no": 3
}, {
"height": "2000",
"length": "1000",
"depth": "600",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2629",
"price": "189.2",
"cart": "307834",
"sku_1": "S2649",
"price_1": "149.6",
"cart_1": "307850",
"no": 4
}, {
"height": "2000",
"length": "1000",
"depth": "800",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2630",
"price": "213.5",
"cart": "307835",
"sku_1": "S2650",
"price_1": "171.7",
"cart_1": "307851",
"no": 5
}, {
"height": "2000",
"length": "1300",
"depth": "300",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2633",
"price": "178.3",
"cart": "307836",
"sku_1": "S2653",
"price_1": "140.5",
"cart_1": "307852",
"no": 6
}, {
"height": "2000",
"length": "1300",
"depth": "400",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2634",
"price": "194.3",
"cart": "307837",
"sku_1": "S2654",
"price_1": "155.8",
"cart_1": "307853",
"no": 7
}, {
"height": "2000",
"length": "1300",
"depth": "500",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2635",
"price": "218.9",
"cart": "307838",
"sku_1": "S2655",
"price_1": "179.3",
"cart_1": "307854",
"no": 8
}, {
"height": "2000",
"length": "1300",
"depth": "600",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2636",
"price": "236",
"cart": "307839",
"sku_1": "S2656",
"price_1": "195.5",
"cart_1": "307855",
"no": 9
}, {
"height": "2000",
"length": "1300",
"depth": "800",
"lowershelf": "5",
"tragkraft_pro_boden": "250 kg",
"sku": "S2637",
"price": "300.3",
"cart": "307840",
"sku_1": "S2657",
"price_1": "257.6",
"cart_1": "307856",
"no": 10
}, {
"height": "3000",
"length": "1300",
"depth": "500",
"lowershelf": "7",
"tragkraft_pro_boden": "250 kg",
"sku": "S2715",
"price": "322",
"cart": "307898",
"sku_1": "S2735",
"price_1": "258.9",
"cart_1": "307912",
"no": 38
}, {
"height": "3000",
"length": "1300",
"depth": "600",
"lowershelf": "7",
"tragkraft_pro_boden": "250 kg",
"sku": "S2716",
"price": "346.2",
"cart": "307899",
"sku_1": "S2736",
"price_1": "281.6",
"cart_1": "307913",
"no": 39
}, {
"height": "3000",
"length": "1300",
"depth": "800",
"lowershelf": "7",
"tragkraft_pro_boden": "250 kg",
"sku": "S2717",
"price": "436.6",
"cart": "307900",
"sku_1": "S2737",
"price_1": "368.7",
"cart_1": "307914",
"no": 40
}, {
"height": "3000",
"length": "1000",
"depth": "300",
"lowershelf": "7",
"tragkraft_pro_boden": "330 kg",
"sku": "S2961",
"price": "239.6",
"cart": "307901",
"sku_1": "S2971",
"price_1": "180.8",
"cart_1": "307915",
"no": 41
}, {
"height": "3000",
"length": "1000",
"depth": "400",
"lowershelf": "7",
"tragkraft_pro_boden": "330 kg",
"sku": "S2962",
"price": "263.2",
"cart": "307902",
"sku_1": "S2972",
"price_1": "203.5",
"cart_1": "307916",
"no": 42
}, {
"height": "3000",
"length": "1000",
"depth": "500",
"lowershelf": "7",
"tragkraft_pro_boden": "330 kg",
"sku": "S2963",
"price": "291.5",
"cart": "307903",
"sku_1": "S2973",
"price_1": "230.2",
"cart_1": "307917",
"no": 43
}, {
"height": "3000",
"length": "1000",
"depth": "600",
"lowershelf": "7",
"tragkraft_pro_boden": "330 kg",
"sku": "S2964",
"price": "316.1",
"cart": "307904",
"sku_1": "S2974",
"price_1": "253.2",
"cart_1": "307918",
"no": 44
}, {
"height": "3000",
"length": "1000",
"depth": "800",
"lowershelf": "7",
"tragkraft_pro_boden": "330 kg",
"sku": "S2965",
"price": "349.5",
"cart": "307919",
"sku_1": "S2975",
"price_1": "283.5",
"cart_1": "307920",
"no": 45
}];
var table_layout_2371 = 'fitColumns';
var paginationSize_2371 = 10;
if (is_mobile()) {
table_layout_2371 = 'fitData';
paginationSize_2371 = 1;
}
var table_2371 = new Tabulator("#product-table-2371", {
"data": tabledata_2371,
"locale": "de-de",
"columnHeaderVertAlign": "bottom",
"langs": {
"de-de": {
"pagination": {
"page_size": "Einträge pro Seite",
"page_title": "Seite anzeigen",
"first": "Erste",
"first_title": "Erste Seite",
"last": "Letzte",
"last_title": "Letzte Seite",
"prev": "Zurück",
"prev_title": "Zurück",
"next": "Weiter",
"next_title": "Nächste Seite",
"all": "Alle"
}
}
},
"tooltips": true,
"pagination": 'local',
"paginationSize": paginationSize_2371,
"paginationSizeSelector": true,
"paginationSizeSelector": [1, 5, 10, 25, 50, 100],
"responsiveLayout": "collapse",
"layout": table_layout_2371,
initialSort: [{
"column": "height",
"dir": "asc"
}],
"selectable": true,
"tooltipGenerationMode": "hover",
"tooltipsHeader": true,
"responsiveLayoutCollapseFormatter": responsive_layout_formatter_2371,
"columns": columns_json_2371
});
table_2371.clearData();
table_2371.clearFilter();
table_2371.setData(tabledata_2371);
var table_filter_2371 = $(".product-filter-2371");
if (table_filter_2371.length) {
table_filter_2371.change(function() {
table_2371.clearFilter();
var filter_array_2371 = [];
$(".product-filter-2371").each(function() {
if ($(this).val() !== '') {
filter_array_2371.push({
'field': $(this).data('column'),
'type': '=',
'value': $(this).val()
});
}
});
table_2371.setFilter(filter_array_2371);
});
}
});
</script>
Any ideas?
Best,
Georg.
I am trying to update tables in Google Documents with the new API. Tables are linked from a Google Sheet.
I tried the API explorer in google cloud. I am able to extract the document in json format and then filter out the tables. But within the table json structure, I do not find anything that I can update, I do not find anything that links the table to a spreadsheet. It is plain text (from the cells in the spreadsheet).
Here I am sharing one table from the json, with 2 rows and 1 column with "Written English" and "Verbal English" as cell value.
"table": {
"rows": 2,
"columns": 1,
"tableRows": [
{
"startIndex": 77,
"endIndex": 95,
"tableCells": [
{
"startIndex": 78,
"endIndex": 95,
"content": [
{
"startIndex": 79,
"endIndex": 95,
"paragraph": {
"elements": [
{
"startIndex": 79,
"endIndex": 94,
"textRun": {
"content": "Written English",
"textStyle": {
"underline": true,
"foregroundColor": {
"color": {
"rgbColor": {
"red": 0.06666667,
"green": 0.33333334,
"blue": 0.8
}
}
},
"fontSize": {
"magnitude": 24,
"unit": "PT"
},
"weightedFontFamily": {
"fontFamily": "Arial",
"weight": 400
}
}
}
},
{
"startIndex": 94,
"endIndex": 95,
"textRun": {
"content": "\n",
"textStyle": {
"foregroundColor": {
"color": {
"rgbColor": {
"red": 0.8784314,
"green": 0.16078432,
"blue": 0.42352942
}
}
},
"fontSize": {
"magnitude": 24,
"unit": "PT"
},
"weightedFontFamily": {
"fontFamily": "Arial",
"weight": 400
}
}
}
}
],
"paragraphStyle": {
"namedStyleType": "NORMAL_TEXT",
"lineSpacing": 115,
"direction": "LEFT_TO_RIGHT",
"spacingMode": "COLLAPSE_LISTS",
"spaceAbove": {
"unit": "PT"
},
"avoidWidowAndOrphan": false
}
}
}
],
"tableCellStyle": {
"rowSpan": 1,
"columnSpan": 1,
"backgroundColor": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"borderLeft": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"borderRight": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"borderTop": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"borderBottom": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"paddingLeft": {
"magnitude": 2,
"unit": "PT"
},
"paddingRight": {
"magnitude": 2,
"unit": "PT"
},
"paddingTop": {
"magnitude": 2,
"unit": "PT"
},
"paddingBottom": {
"magnitude": 2,
"unit": "PT"
},
"contentAlignment": "BOTTOM"
}
}
],
"tableRowStyle": {
"minRowHeight": {
"magnitude": 15,
"unit": "PT"
}
}
},
{
"startIndex": 95,
"endIndex": 112,
"tableCells": [
{
"startIndex": 96,
"endIndex": 112,
"content": [
{
"startIndex": 97,
"endIndex": 112,
"paragraph": {
"elements": [
{
"startIndex": 97,
"endIndex": 111,
"textRun": {
"content": "Verbal English",
"textStyle": {
"underline": true,
"foregroundColor": {
"color": {
"rgbColor": {
"red": 0.06666667,
"green": 0.33333334,
"blue": 0.8
}
}
},
"fontSize": {
"magnitude": 14,
"unit": "PT"
},
"weightedFontFamily": {
"fontFamily": "Raleway",
"weight": 400
}
}
}
},
{
"startIndex": 111,
"endIndex": 112,
"textRun": {
"content": "\n",
"textStyle": {
"foregroundColor": {
"color": {
"rgbColor": {
"red": 0.8784314,
"green": 0.16078432,
"blue": 0.42352942
}
}
},
"fontSize": {
"magnitude": 14,
"unit": "PT"
},
"weightedFontFamily": {
"fontFamily": "Arial",
"weight": 400
}
}
}
}
],
"paragraphStyle": {
"namedStyleType": "NORMAL_TEXT",
"lineSpacing": 115,
"direction": "LEFT_TO_RIGHT",
"spacingMode": "COLLAPSE_LISTS",
"spaceAbove": {
"unit": "PT"
},
"avoidWidowAndOrphan": false
}
}
}
],
"tableCellStyle": {
"rowSpan": 1,
"columnSpan": 1,
"backgroundColor": {
},
"borderLeft": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"borderRight": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"borderTop": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"borderBottom": {
"color": {
"color": {
"rgbColor": {
"red": 1,
"green": 1,
"blue": 1
}
}
},
"width": {
"magnitude": 0.75,
"unit": "PT"
},
"dashStyle": "SOLID"
},
"paddingLeft": {
"magnitude": 2,
"unit": "PT"
},
"paddingRight": {
"magnitude": 2,
"unit": "PT"
},
"paddingTop": {
"magnitude": 2,
"unit": "PT"
},
"paddingBottom": {
"magnitude": 2,
"unit": "PT"
},
"contentAlignment": "BOTTOM"
}
}
],
"tableRowStyle": {
"minRowHeight": {
"magnitude": 15,
"unit": "PT"
}
}
}
],
"tableStyle": {
"tableColumnProperties": [
{
"widthType": "FIXED_WIDTH",
"width": {
"magnitude": 363,
"unit": "PT"
}
}
]
}
}
In short, I am trying to programmatically do what "UPDATE" button does on a linked table in Google Docs.
Looking forward to any help.
Thanks.
The issue is created here in the issuetracker. Star(on the top left) the issue to help Google priorotize the issue!
I am having an issue with a line chart on my site. Everything works fine about it except no matter what I try, I cannot get the crosshair-x value/scale to show up. http://gyazo.com/42a34d0fed9c2912bf7ed40eb0c55144 Both are set to "visible": true. My JSON code is as follows:
var myChart = {
"type": "line",
"background-color": "transparent",
"utc": true,
"title": {
"y": "0px",
"text": '#myClasses.STARTDATETIME.ToString("MM/d/yyyy (h:mm tt)")',
"background-color": "transparent",
"font-size": "16px",
"font-color": "#666",
"font-weight": "bold",
"letter-spacing": "0.1225em",
"height": "25px"
},
"plotarea": {
"margin":"10% 8% 14% 12%",
"background-color":"#666"
},
"legend": {
"visible": false,
},
"scale-x": {
"min-value": myEpoch,
"shadow": 0,
"step": #ViewBag.TotalTime,
"line-color": "#fff",
"tick": {
"line-color": "#f6f7f8"
},
"guide": {
"line-color": "#f6f7f8",
"visible": true
},
"item": {
"font-color": "#666"
},
"transform": {
"type": "date",
"all": "%D,%d %M<br />%h:%i %A",
"item": {
"visible": false
}
},
"label": {
"visible": false,
"font-color": "#666"
},
"minor-ticks": 0
},
"scale-y": {
"values": "25:200:25",
"line-color": "#fff",
"shadow": 0,
"tick": {
"line-color": "#f6f7f8"
},
"guide": {
"visible": false
},
"item": {
"font-color": "#666"
},
"label": {
"text": "Heart Rate (BPM)",
"font-color": "#666"
},
"minor-ticks": 0,
"thousands-separator": ",",
"markers": [
{
"type": "area",
"range": [25, 60],
"backgroundColor": "#585857",
"alpha": 1
},
{
"type": "area",
"range": [60, 95],
"backgroundColor": "#6FCBDC",
"alpha": 1
},
{
"type": "area",
"range": [95, 130],
"backgroundColor": "#8BC540",
"alpha": 1
},
{
"type": "area",
"range": [130, 165],
"backgroundColor": "#F38220",
"alpha": 1
},
{
"type": "area",
"range": [165, 200],
"backgroundColor": "#EB2026",
"alpha": 1
}
]
},
"tooltip": {
"font-color": "#666",
"visible": false
},
"chart": {
"marginRight": 30,
"marginLeft": 70
},
"plot": {
"tooltip-text": "%t bpm: %v",
"shadow": 0,
"line-width": "3px",
"marker": {
"type": "circle",
"size": 2
},
"hover-marker": {
"type": "circle",
"size": 4,
"border-width": "1px"
}
},
"series": [
{
"values": [88,96,93,88,88,86,89,120,144,153,156,132,113,145,138,152,135,155,164,165,147,143,152,140,153,138,116,125,131,132,134,124,111,136,167,171,165,168,139,129,138,130,140,141],
"text": "",
"line-color": "#ffffff",
"marker": {
"background-color": "#ffffff",
"border-width": 1,
"shadow": 0,
"border-color": "#ffffff",
"visible": true
},
"palette": 0
}
],
"crosshair-x": {
"line-color": "#f6f7f8",
"value-label": {
"border-radius": "5px",
"border-width": "1px",
"border-color": "#f6f7f8",
"padding": "0px 10px 0px 5px",
"font-weight": "bold",
"font-color": "#fff",
"background-color": "#666",
"visible": true
},
"scale-label": {
"font-color": "#fff",
"background-color": "#666",
"border-radius": "5px",
"border-width": "1px",
"border-color": "#f6f7f8",
"padding": "0px 10px 0px 5px",
"visible": true
}
}
};
Is there anything obvious that I'm missing that may be overruling those being set to visible?
Thanks in advance for your help!
Which version of ZingChart are you using? Does this occur in all browsers? Are you getting any console errors? I've taken your code and put it into our demo tool, and the crosshair seems to work. Take a look here.
You can try adding the following to the <head> element of your application:
<style title="zingchart"></style>
This forces ZingChart to inject its CSS into that element, preventing certain types of conflicts that can occur from time to time, but I'm not 100% sure that this is the issue.
I'm on the ZingChart support team, so I'd love to help, but I can't reproduce the issue on my end.