How can I stretch the Swiffy result (SVG) to fit the entire page? (I can't add attributes to the SVG element because it is not there, swiffy generates it)
My swiffy:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Swiffy output</title>
<script src="runtime.js"></script>
<script>
swiffyobject = { "internedStrings": ["::::080f080f"], "tags": [{ "frames": [], "scenes": [{ "name": "Scene 1", "offset": 0 }], "type": 23 }, { "bounds": [{ "ymin": 0, "ymax": 25600, "xmin": 0, "xmax": 15360 }], "id": 1, "fillstyles": [{ "color": [-6174960], "type": 1 }], "paths": [{ "fill": 0, "data": [":::a:600ya360o:a:600Yc"] }], "flat": true, "type": 1 }, { "id": 1, "matrix": 0, "type": 3, "depth": 1 }, { "id": 2, "height": 608, "width": 608, "data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAmAAAAJgCAYAAAAta9/QAAAl8ElEQVR42u3d3W0jR5cG4MnAITgE\nh6AQdOULNT9gQmAICkEhMASGoLEM3xlQAD0ahjAh7LKalEaWKImkuv6fB3j3YhcL21Sz+7Dq9Kkv\nXwAiudtcXTzPXw/D9ct8+z6sv31f3KbNsD707/Ly39dfEAAowj8/ht9fFVTj4uZZgfPzr++L/2sp\n24Jt8/jfF/5b9//dy8fPIXwmrgwA4Cx///jfH8+Lq6fVqXG4b62oilesPa2yrZ6vqinSAKBj/z78\n+durAius7CieUhRnP18UaEtbnQDQ2GrW9qH/dVdoPT30NwqhQouzcbh/3p92Nw6XVs0AoHDTqta+\nF0tB096qWSjKFGQAkNHUCD8Ol89Wt34qVnopyMILAftVsm3RHbaUfSMAINbq1sOw3PdsKbbkcFH2\nffE1bD37xgDApwouq1uiIAMABZdU2kc2bVt66xKAfj2+oWhLUTIWZCtvWgLQR9E1vaVoFISUNwIj\nXJu2KwGoXlhZsK0oNfePWR0DoJ5VrjAawtE90tLq2PaHhNUxAEpc6bq2tSg9rI4ZCAuAlS4RK2MA\ndLDStbTSJXK4GLMyBsAswjEv07gIK10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IOdZIRByaDWBFTES82QjQWSHmjUkR8WYj\nQHJGV4jIpwuvcbhXeAGcsyI2DpcKMRE5ecVre+9wBwWwIiYiCWZ5WfECiLEi5q1JEdHjBZBzRcxb\nkyK9v9Wo8ALItSJmsr5IdwNUFV4ABQizff4aFzceTiLNbjP+DN9xc7wASi3EHoZrh36LNFR4PQzL\ncI6sOxxA4cLNeuoT07AvUu0Mr/AdVngBVOqxT8yqmEj5q136uwCsiomI1S4A5vL3j//9EV5htyom\nknW1ax2+i+5IAB0KDb5WxUQSrnZtv3PuPAA8rYqF19ytionEGSFhtQuAd+0PAbdFKfLJLUaHYgNw\nlmmLcvsg8VAVOe54oNBQ784BwCymtyj1i4m82dflLUYAotpP3FeMiaJL0QWAYkwkal/XbbjWnccI\nQFGehr3qGZOGGukNSQWgKvu3KVfbbDzQpZIm+k0YGeHtRQCa8GzO2K0HvZS1yjVtLV6b0wVA08J2\nzq/VMbPGxCoXACQ3NfLve8dsV0qMgksvFwB8YNquVJDJJ0ZEhNXVsMLljUUA+PwK2cq4Czk4HmK/\npajgAoCIwsM2NE6Hh68+sg63EzXNA0AZq2R3m6uLkF1hZvuyhW3EMPj08e+qfwsAKjG9cfmfosxq\nWaGrWk/FlqsWAFpdLdtvYVoty7KqNX3uVrUAgKfVsv2K2XI/p+zW8NjThpo+NsWHFyceP09XFwBw\nltD0PRUUr1bP+ijSHv87X65ihXj7EADI6vkLAY+raY8Fy7M3N3fJMFbjP//8/RuFz7J8/u+usAJi\n+H88a48XWWKZOwAAAABJRU5ErkJggg\u003d\u003d", "type": 8 }, { "bounds": [{ "ymin": -6080, "ymax": 6080, "xmin": -6080, "xmax": 6080 }], "id": 3, "fillstyles": [{ "transform": "45184l::45184l080F080F", "bitmap": 2, "type": 6 }], "paths": [{ "fill": 0, "data": [":080F080Fa:160la160l:a:160Lc"] }], "flat": true, "type": 1 }, { "tags": [{ "id": 3, "matrix": "#0", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "781D335x335X781D931e727e", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "397R5334d5334D397R926e341e", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "8865C9730e9730E8865C064f981d", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "3204F5430f5430F3204F327f699d", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "7706H1598f1598F7706H674f539d", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "4307J2640e2640E4307J964f511d", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "7870K9206c9206C7870K251g566d", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "7005L445v445V7005L513g704d", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "0936M774c774C0936M723g909d", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "9333L997N997n9333L864g161e", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "1149L4489C4489c1149L927g481e", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "7268J0394E0394e7268J888g804e", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "9071H1087F1087f9071H745g097f", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "8438F5462F5462f8438F520g330f", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "7711D3007F3007f7711D233g477f", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "8615B4023E4023e8615B911f526f", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "337M9455C9455c337M591f471f", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "457C803T803t457C302f318f", "type": 3, "depth": 1 }, { "type": 2 }, { "replace": true, "matrix": "#0", "type": 3, "depth": 1 }, { "type": 2 }], "id": 4, "frameCount": 20, "type": 7 }, { "id": 4, "matrix": "::::00q302k", "type": 3, "depth": 2 }, { "bounds": [{ "ymin": 2918, "ymax": 25600, "xmin": 0, "xmax": 15360 }], "id": 5, "fillstyles": [{ "color": [-10507490], "type": 1 }, { "color": [-4072357], "type": 1 }, { "color": [-1], "type": 1 }], "paths": [{ "fill": 0, "data": [":360o340la360O043ja:217ca360o:a:260Mc"] }, { "fill": 1, "data": [":485j146da:18db37D7N76I7Sa88I1Ca81Gia81Gia36Jaa37JAa9Pfb2Rp9S1tbE5fE5saa86kba05gF86kbB1n2d5wb6d8i8o4qb5o6j4w8jba:b:b4h:5v7Ja98q58Ma3e5Db8bV9eVbe:jaa99d97pbn9d1d9gby0c0g2eb8dw9n0fb7h7c6m4ha2e:a99B70Jb4Q27F89B74Jb4C1M2J5Tb8F3G9R9Jb6EQ2JQbP:1Cbb3Fi1L5ea19O88ka66D56caF0Gal15Vac8Cbc7M6m9Mb5kC0rCb3c:4eaa62gxa61gra56osa57ooa46e:a:15ta94V80Ia8c7ra9b8pbi7f5d9jb3c8c9i6fb90j70d55p28gb9x3k09e3kbo:0c:b7hB6nYb7fY5k3Ha:25Xb8G3H1R3Zb6K2T5R88Bc"] }, { "fill": 2, "data": [":204h929ba:00ha6o:a:00Hc:55fKa5Kia9ChaQ8la8fMa9fFb8h:4m5eb5d4e5d1qa:9gb:5eL4jbM1e7C5hbY5c7F7eb0Dt1Jtb1F:1JTb0DU8F8EbZ9C8C7HbL1EL9Ja:12Da9O:a:21db:1s5i90bb5i1j79b1jb6r:82b3Jb7i1J7i04Ca:6Ib:4HW5NbW2F2F0Jb0D7C6I7Eb5ER2LRc:87Pka2y96fa1Lya7Lpa0d1na7p9Bb8fK0o6Cb1gW7l5Eb7e2C8i0Hb1d7D4f6Kbv6Fv0Pa:02Da9O:a:99caE6hbE8cR8fbO3c5C2ebVw7E9ca9V44Fc:68D:a:33ka9o:a:33Kc"] }], "flat": true, "type": 1 }, { "id": 5, "matrix": 0, "type": 3, "depth": 9 }, { "bounds": [{ "ymin": -4719, "ymax": 5010, "xmin": -4719, "xmax": 4720 }], "id": 6, "paths": [{ "data": [":a549Db26I:71Q58cb17H45c46N75ib30F29f75I45nb58C46h58C71qb:26i58c71qb45c16h75i46nb29f29f46n75ib45h57c71q57cb26i:71q57Cb16h46C46n75Ib29f30F74i46Nb58c45H58c71Qb:25I58C71Qb45C16H74I45Nb30F30F46N75Ib46H58C71Q58Cc:81l16ob91e0y47j05gb55d56d05g47jb9y11f9y81lb:70f9Y82lb0Y90e05G46jb56D56d47J06gb11F9y81L9yb70F:82L9Yb91E0Y47J06Gb55D56D05G46Jb9Y12F9Y82Lb:70F9y81Lb0y91E05g47Jb56d55D47j05Gb12f9Y82l9Yb70f:81l9yc"], "line": 0 }], "flat": true, "linestyles": [{ "joint": 2, "color": [-6174960], "cap": 1, "width": [340], "miter": 10 }], "type": 1 }, { "tags": [{ "id": 6, "matrix": "::::549d549d", "type": 3, "depth": 1 }, { "type": 2 }], "id": 7, "frameCount": 1, "type": 7 }, { "id": 7, "matrix": "::::230d429l", "type": 3, "depth": 10 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "bounds": [{ "ymin": 3567, "ymax": 3743, "xmin": 6669, "xmax": 6858 }], "id": 8, "fillstyles": [{ "color": [-1], "type": 1 }], "paths": [{ "fill": 0, "data": [":763f567cb8C:6Fzb8B8b8B3fb:5c8b1fb8bz6fzb9c:7fZb8bY8b1Fb:6C8B3Fb8BZ7FZc"] }], "flat": true, "type": 1 }, { "id": 8, "matrix": 0, "type": 3, "depth": 12 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 4, "depth": 12 }, { "bounds": [{ "ymin": 3567, "ymax": 3743, "xmin": 6348, "xmax": 6858 }], "id": 9, "fillstyles": [{ "color": [-1], "type": 1 }], "paths": [{ "fill": 0, "data": [":442f567cb8C:7Fzb7B7b7B3fb:6c7b1fb9bz7fzb0d:7fZb8bY8b1Fb:6C8B3Fb7BZ7FZc:21c:b8C:6Fzb8B8b8B3fb:5c8b1fb8bz6fzb9c:7fZb8bY8b1Fb:6C8B3Fb8BZ7FZc"] }], "flat": true, "type": 1 }, { "id": 9, "matrix": 0, "type": 3, "depth": 13 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 4, "depth": 13 }, { "bounds": [{ "ymin": 3567, "ymax": 3743, "xmin": 6027, "xmax": 6858 }], "id": 10, "fillstyles": [{ "color": [-1], "type": 1 }], "paths": [{ "fill": 0, "data": [":120f567cb8C:6Fzb7B7b7B3fb:6c7b1fb8bz6fzb9c:8fZb7bY7b1Fb:6C7B3Fb9BZ8FZc:22c:b8C:7Fzb7B7b7B3fb:6c7b1fb9bz7fzb0d:7fZb8bY8b1Fb:6C8B3Fb7BZ7FZc:21c:b8C:6Fzb8B8b8B3fb:5c8b1fb8bz6fzb9c:7fZb8bY8b1Fb:6C8B3Fb8BZ7FZc"] }], "flat": true, "type": 1 }, { "id": 10, "matrix": 0, "type": 3, "depth": 14 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 4, "depth": 14 }, { "id": 9, "matrix": 0, "type": 3, "depth": 13 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 2 }, { "type": 4, "depth": 13 }, { "id": 8, "matrix": 0, "type": 3, "depth": 12 }, { "type": 2 }], "fileSize": 11203, "v": "5.2.0", "backgroundColor": -1, "frameSize": { "ymin": 0, "ymax": 25600, "xmin": 0, "xmax": 15360 }, "frameCount": 25, "frameRate": 24, "version": 15 };
</script>
<style>
html, body {
width: 100%;
height: 100%;
}
</style>
</head>
<body style="margin: 0; overflow: hidden">
<div id="swiffycontainer" style="width: 100%; height: 100%">
</div>
<script>
var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
swiffyobject);
stage.start();
</script>
</body>
</html>
Try specifying width and height in pixels. This works for me. Also, you may need to remove the overflow style. If this works with your file then get the width and height of the page using JavaScript and apply to the swiffy container div
Related
I'm using highcharts and react-highcharts to display some graph in my application. Ideally I would like to color the area of the graph with some gradient, from the documentation and this example the option that I should add is this:
plotOptions: {
area: {
fillColor: {
linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1
},
stops: [
[0, Highcharts.getOptions().colors[0]],
[1, Highcharts.color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
]
}
}
},
I'm trying to replicate the same with the configuration of my graph but it doesn't work, the graph looks exactly the same as if there was no fillColor option added. Here's the config of my graph:
{
"title": {
"text": ""
},
"chart": {
"height": 500,
"animation": false,
"events": {}
},
"legend": {
"enabled": true,
"align": "center",
"verticalAlign": "bottom",
"useHTML": true,
"y": 15
},
"navigator": {
"enabled": true,
"adaptToUpdatedData": false,
"handles": {
"enabled": false
},
"outlineWidth": 0,
"maskFill": "rgba(0, 0, 0, 0)",
"series": {
"type": "areaspline",
"color": "#4572A7",
"fillOpacity": 0.05,
"dataGrouping": {
"smoothed": true
},
"lineWidth": 1,
"marker": {
"enabled": false
},
"data": [
[
1623200400000,
1.3675397235722446
],
[
1623286800000,
1.3482760115327748
],
[
1623373200000,
1.3546129384275694
],
[
1623632400000,
1.3414434698775963
],
[
1623718800000,
1.3312870572603575
],
[
1623200400000,
1.3675397235722446
],
[
1623286800000,
1.3482760115327748
],
[
1623373200000,
1.3546129384275694
],
[
1623632400000,
1.3414434698775963
],
[
1623718800000,
1.3312870572603575
]
]
},
"max": null
},
"rangeSelector": {
"enabled": true,
"inputEnabled": true,
"buttons": [
{
"type": "mtd",
"count": 1,
"text": "MTD"
},
{
"type": "ytd",
"text": "YTD"
},
{
"type": "month",
"count": 1,
"text": "1m",
"preventDefault": true,
"performancePeriod": "one_month"
},
{
"type": "month",
"count": 3,
"text": "3m",
"preventDefault": true,
"performancePeriod": "three_months_actual"
},
{
"type": "month",
"count": 6,
"text": "6m",
"preventDefault": true,
"performancePeriod": "six_months_actual"
},
{
"type": "year",
"count": 1,
"text": "1y",
"preventDefault": true,
"performancePeriod": "one_year_actual"
},
{
"type": "year",
"count": 3,
"text": "3y",
"preventDefault": true,
"performancePeriod": "one_year_actual"
},
{
"type": "all",
"text": "All"
}
],
"selected": 5
},
"credits": {
"enabled": false
},
"yAxis": {
"labels": {
"style": {
"color": false,
"fontSize": false
}
},
"plotLines": [
{
"value": 0,
"width": 2,
"color": "silver"
}
]
},
"xAxis": {
"type": "datetime",
"startOnTick": false,
"labels": {
"style": {
"color": false,
"fontSize": false
}
},
"max": null,
"events": {}
},
"plotOptions": {
"area": {
"fillColor": {
"linearGradient": [
0,
0,
0,
300
],
"stops": [
[
0,
"#333"
],
[
1,
"#444"
]
]
}
},
"series": {
"marker": {
"lineColor": "white",
"fillColor": "#203A4C",
"symbol": "diamond",
"radius": 3,
"states": {
"hover": {
"fillColor": "white",
"radius": 5
}
}
},
"compare": "percent",
"compareBase": 0
}
},
"tooltip": {
"crosshairs": true,
"dateTimeLabelFormats": {
"millisecond": "%b %e, %Y",
"second": "%b %e, %Y",
"minute": "%b %e, %Y",
"hour": "%b %e, %Y",
"day": "%b %e, %Y",
"week": "%b %e, %Y",
"month": "%b %e, %Y",
"year": "%b %e, %Y"
},
"headerFormat": "<strong>{point.key}<strong><br/>",
"split": true,
"valueDecimals": 2
},
"series": [
{
"id": null,
"name": "test",
"data": [
[
1623200400000,
1.3675397235722446
],
[
1623286800000,
1.3482760115327748
],
[
1623373200000,
1.3546129384275694
],
[
1623632400000,
1.3414434698775963
],
[
1623718800000,
1.3312870572603575
],
[
1623200400000,
1.3675397235722446
],
[
1623286800000,
1.3482760115327748
],
[
1623373200000,
1.3546129384275694
],
[
1623632400000,
1.3414434698775963
],
[
1623718800000,
1.3312870572603575
]
],
"lineWidth": 2,
"tooltip": {
"valueDecimals": 4
}
}
]
}
If I remove the plotOptions.area property nothing changes in the graph, what am I missing?
Notice that with your current data the error occurs in the console:
https://assets.highcharts.com/errors/15/
The fillColor feature works only for particular series - like area, pie, funnel, pyramid, arearange etc, so you need to define the type of the series that you want to implemnent.
Simplified demo: https://jsfiddle.net/BlackLabel/5r8gxh2b/
I am trying to get specific object from a whole object below is the example
by using localStorage.getItem('shop/elasticCache/shirt');
I get below data
{"description":"Tech Shirt","configurable_options":[{"attribute_id":80,"values":[{"value_index":"5176","label":"RUST"}],"label":"Color","attribute_code":"color"},{"attribute_id":125,"values":[{"value_index":"2898","label":"Small"},{"value_index":"2901","label":"Medium"},{"value_index":"2904","label":"Large"}],"label":"Size","attribute_code":"size"}],"tsk":1594790209,"size_options":[2898,2901,2904],"regular_price":28,"final_price":null,"price":28,"color_options":[5176],"special_from_date":null,"id":250659,"category":[{"category_id":2,"name":"Default Category","position":1},{"category_id":3,"name":"Clothing","position":14985},{"category_id":30,"name":"Bottoms","position":798},{"category_id":58,"name":"Leggings","position":1},{"category_id":1130,"name":"Char Test Category","position":30}],"sku":"S155551","product_links":[{"link_type":"related","linked_product_sku":null,"linked_product_type":null,"position":0,"sku":"P100031"},{"link_type":"related","linked_product_sku":null,"linked_product_type":null,"position":0,"sku":"P100031"}
I am trying to get
{"category_id":3,"name":"Clothing","position":14985},{"category_id":30,"name":"Bottoms","position":798},{"category_id":58,"name":"Leggings","position":1},{"category_id":1130,"name":"Char Test Category","position":30}]
Is their any way it can be done ?
const {category} = JSON.parse(localStorage.getItem('shop/elasticCache/shirt');)
or
const {category } = {
"description": "Tech Shirt",
"configurable_options": [{
"attribute_id": 80,
"values": [{
"value_index": "5176",
"label": "RUST"
}],
"label": "Color",
"attribute_code": "color"
}, {
"attribute_id": 125,
"values": [{
"value_index": "2898",
"label": "Small"
}, {
"value_index": "2901",
"label": "Medium"
}, {
"value_index": "2904",
"label": "Large"
}],
"label": "Size",
"attribute_code": "size"
}],
"tsk": 1594790209,
"size_options": [2898, 2901, 2904],
"regular_price": 28,
"final_price": null,
"price": 28,
"color_options": [5176],
"special_from_date": null,
"id": 250659,
"category": [{
"category_id": 2,
"name": "Default Category",
"position": 1
}, {
"category_id": 3,
"name": "Clothing",
"position": 14985
}, {
"category_id": 30,
"name": "Bottoms",
"position": 798
}, {
"category_id": 58,
"name": "Leggings",
"position": 1
}, {
"category_id": 1130,
"name": "Char Test Category",
"position": 30
}],
"sku": "S155551",
"product_links": [{
"link_type": "related",
"linked_product_sku": null,
"linked_product_type": null,
"position": 0,
"sku": "P100031"
}, {
"link_type": "related",
"linked_product_sku": null,
"linked_product_type": null,
"position": 0,
"sku": "P100031"
}]
}
objc={"description":"Tech Shirt","configurable_options":
[{"attribute_id":80,"values":[{"value_index":"5176","label":"RUST"}],
"label":"Color","attribute_code":"color"},
{"attribute_id":125,"values":[{"value_index":"2898","label":"Small"}
,{"value_index":"2901","label":"Medium"},
{"value_index":"2904","label":"Large"}],
"label":"Size","attribute_code":"size"}],
"tsk":1594790209,"size_options":[2898,2901,2904]
,"regular_price":28,"final_price":null,"price":28,
"color_options":[5176],"special_from_date":null,"id":250659,
"category":[{"category_id":2,"name":"Default Category","position":1},
{"category_id":3,"name":"Clothing","position":14985},
{"category_id":30,"name":"Bottoms","position":798},
{"category_id":58,"name":"Leggings","position":1},
{"category_id":1130,"name":"Char Test Category","position":30}],
"sku":"S155551","product_links":
[{"link_type":"related","linked_product_sku":null,"linked_product_type":null,"position":0,"sku":"P100031"},
{"link_type":"related","linked_product_sku":null,"linked_product_type":null,"position":0,"sku":"P100031"}]
}
res = objc["category"]
res.shift()
console.log(res)
$(document).ready(function () {
var jsonObj = {
"description": "Tech Shirt",
"configurable_options": [{
"attribute_id": 80,
"values": [{
"value_index": "5176",
"label": "RUST"
}],
"label": "Color",
"attribute_code": "color"
}, {
"attribute_id": 125,
"values": [{
"value_index": "2898",
"label": "Small"
}, {
"value_index": "2901",
"label": "Medium"
}, {
"value_index": "2904",
"label": "Large"
}],
"label": "Size",
"attribute_code": "size"
}],
"tsk": 1594790209,
"size_options": [2898, 2901, 2904],
"regular_price": 28,
"final_price": null,
"price": 28,
"color_options": [5176],
"special_from_date": null,
"id": 250659,
"category": [{
"category_id": 2,
"name": "Default Category",
"position": 1
}, {
"category_id": 3,
"name": "Clothing",
"position": 14985
}, {
"category_id": 30,
"name": "Bottoms",
"position": 798
}, {
"category_id": 58,
"name": "Leggings",
"position": 1
}, {
"category_id": 1130,
"name": "Char Test Category",
"position": 30
}],
"sku": "S155551",
"product_links": [{
"link_type": "related",
"linked_product_sku": null,
"linked_product_type": null,
"position": 0,
"sku": "P100031"
}, {
"link_type": "related",
"linked_product_sku": null,
"linked_product_type": null,
"position": 0,
"sku": "P100031"
}]
};
for(var i = 1; i < jsonObj.category.length; i++){
console.log(jsonObj.category[i]);
}
});
You can iterate through the entire object and can get the required values. The above code gives the values of category from index 1.
I have treemap chart and it has two values Squadra2 with value of 13778.00 and Squadra1 with value of 16.00
Now when treemap renders it takes percentage difference between them and split them accordingly BUT now I ended up in situation where I need to be sniper precise in order to select Squadra1 with value of 16.00
As you can see in the picture
Is there a possibility to declare for example minimal width of Squadra1, and to disallow it to go under that value ( to remain clickable ) ?
Please let me know, thank you
{
"chart": {
renderTo:"container",
"backgroundColor": "#FFFFFF"
},
"colorAxis": {
"labels": {
"enabled": false
},
"tickLength": 0,
"gridLineWidth": 0,
"min": 0,
"max": 20,
"stops": [
[
-0.001,
"#ffffff"
],
[
0.5,
"#7cb5ec"
],
[
0.501,
"#7cb5ec"
],
[
0.499,
"#ffffff"
],
[
1,
"#434348"
],
[
1.001,
"#434348"
]
]
},
"legend": {
"enabled": true,
"itemStyle": {
"color": "#FFF"
}
},
"tooltip": {},
"series": [
{
"drillUpButton": {
"position": {
"align": "center",
"verticalAlign": "bottom"
},
"theme": {
"fill": "white",
"stroke-width": 1,
"stroke": "silver",
"r": 2,
"style": {
"fontSize": "12px"
},
"states": {
"hover": {}
}
}
},
"type": "treemap",
"layoutAlgorithm": "squarified",
"allowDrillToNode": true,
"dataLabels": {
"enabled": false
},
"levelIsConstant": false,
"levels": [
{
"level": 1,
"dataLabels": {
"enabled": true
},
"borderWidth": 6,
"borderColor": "#FFFFFF"
}
],
"data": [
{
"id": "id_0",
"name": "Squadra1",
"parentName": "Squadra1"
},
{
"id": "id_0_0",
"name": "ACC",
"parent": "id_0",
"parentName": "Squadra1",
"scale": 0,
"value": 1,
"colorValue": 1.8117836848479765
},
{
"id": "id_0_1",
"name": "FEB",
"parent": "id_0",
"parentName": "Squadra1",
"scale": 0,
"value": 0,
"colorValue": 5.48633338681632
},
{
"id": "id_0_2",
"name": "MAG",
"parent": "id_0",
"parentName": "Squadra1",
"scale": 0,
"value": 8,
"colorValue": 3.4398769612396007
},
{
"id": "id_0_3",
"name": "PAM",
"parent": "id_0",
"parentName": "Squadra1",
"scale": 0,
"value": 7,
"colorValue": 2.775814171372472
},
{
"id": "id_1",
"name": "Squadra2",
"parentName": "Squadra2"
},
{
"id": "id_1_0",
"name": "ACC",
"parent": "id_1",
"parentName": "Squadra2",
"scale": 10,
"value": 13778,
"colorValue": 13.595706940649173
}
],
"events": {},
"_colorIndex": 0
}
],
"subtitle": {
"text": "",
"align": "",
"style": {
"color": "",
"fontSize": "",
"fontFamily": "",
"fontStyle": "none",
"textDecoration": "none",
"fontWeight": "none"
}
},
"title": {
"text": "",
"align": "",
"style": {
"color": "",
"fontWeight": "none",
"fontSize": "",
"fontFamily": "",
"fontStyle": "none",
"textDecoration": "none"
}
},
"lang": {
"noData": ""
},
"noData": {
"style": {
"color": "",
"fontSize": "",
"fontFamily": "",
"fontStyle": "none",
"textDecoration": "none",
"fontWeight": "none"
},
"position": {
"align": "",
"verticalAlign": "middle"
}
},
"credits": {
"enabled": false
},
"plotOptions": {
"series": {
"turboThreshold": 5000,
"colorByPoint": false
}
}
}
Link of fiddle
http://jsfiddle.net/3k5fmrut/2/
The easiest way to achieve it is to set a smaller value for Squadra2 and add an additional property with real value to point object that can be used in tooltip.formatter callback to present the real value in the tooltip. Check demo and code posted below.
Code:
data:
{
"id": "id_1",
"name": "Squadra2",
"realValue": 13778,
"parentName": "Squadra2"
}, {
"id": "id_1_0",
"name": "ACC",
"parent": "id_1",
"parentName": "Squadra2",
"scale": 10,
"value": 137.78,
"colorValue": 13.595706940649173
}
tooltip.formatter:
tooltip: {
formatter: function() {
return this.point.realValue;
}
}
Demo:
https://jsfiddle.net/BlackLabel/trz96fy7/
You can define your own algorithm to build the treemap : Highcharts treemap series
You could choose an algorithm such that each element has a minimum width and height, and the biggest elements share the remaining space.
I have json data format given below. From this data I need to display group11 emotions only in 3D charts.So i need x ,y and z value.how to get these values please give me some logic.we can use anything from this given json.
JSON
{
"status": "success",
"result": {
"duration": "15034.88",
"sessionStatus": "Done",
"analysisSegments": [
{
"offset": 0,
"duration": 10000,
"end": 10000,
"analysis": {
"Temper": {
"Value": "62.00",
"Group": "medium",
"Score": "59.00"
},
"Valence": {
"Value": "96.00",
"Group": "positive",
"Score": "94.00"
},
"Arousal": {
"Value": "98.00",
"Group": "high",
"Score": "97.00"
},
"Vad": {
"Voiced": "70.00"
},
"Mood": {
"Group7": {
"Primary": {
"Id": 1,
"Phrase": "Angry"
},
"Secondary": {
"Id": 3,
"Phrase": "Enthusiastic"
}
},
"Group11": {
"Primary": {
"Id": 11,
"Phrase": "Supremacy, Arrogance"
},
"Secondary": {
"Id": 1,
"Phrase": "Creative, Passionate"
}
},
"Group21": {
"Primary": {
"Id": 9,
"Phrase": "egoism"
},
"Secondary": {
"Id": 18,
"Phrase": "motivation"
}
},
"Composite": {
"Primary": {
"Id": 143,
"Phrase": "Insistence and stubbornness. Possibly childishness."
},
"Secondary": {
"Id": 5,
"Phrase": "Ambitious. Assertiveness to achieve goals."
}
}
}
}
},
{
"offset": 5000,
"duration": 10000,
"end": 15000,
"analysis": {
"Temper": {
"Value": "63.00",
"Group": "medium",
"Score": "57.00"
},
"Valence": {
"Value": "89.00",
"Group": "positive",
"Score": "84.00"
},
"Arousal": {
"Value": "94.00",
"Group": "high",
"Score": "91.00"
},
"Vad": {
"Voiced": "62.00"
},
"Mood": {
"Group7": {
"Primary": {
"Id": 1,
"Phrase": "Angry"
},
"Secondary": {
"Id": 3,
"Phrase": "Enthusiastic"
}
},
"Group11": {
"Primary": {
"Id": 11,
"Phrase": "Supremacy, Arrogance"
},
"Secondary": {
"Id": 6,
"Phrase": "Leadership, Charisma"
}
},
"Group21": {
"Primary": {
"Id": 8,
"Phrase": "dominance"
},
"Secondary": {
"Id": 18,
"Phrase": "motivation"
}
},
"Composite": {
"Primary": {
"Id": 107,
"Phrase": "Possessiveness. Ownership. Authoritative."
},
"Secondary": {
"Id": 41,
"Phrase": "Strong drive."
}
}
}
}
}
],
"analysisSummary": {
"AnalysisResult": {
"Temper": {
"Mode": "medium",
"ModePct": "100.00"
},
"Valence": {
"Mode": "positive",
"ModePct": "100.00"
},
"Arousal": {
"Mode": "high",
"ModePct": "100.00"
}
}
}
}
}
What I have tried
x-Emotion name(Supremacy, Arrogance)
y-Emotion count(how many times repeated)
z-Emotion duration(in minutes)
json parse
var counter4=0;
var val4 =0;
var val4minute =0;
var phrase = rawdata[i]["analysis"]["Mood"]["Group11"]["Primary"]["Phrase"];
if (phrase == "Supremacy, Arrogance") {
counter4++;
val4 = counter4 * 10000;
val4minute = Math.floor(val4 / 60000);
}
Here x is "Supremacy, Arrogance" counter4 is y axis and val4minute is z axis
but this logic is wrong can any one give me a better logic.
When I add the guides into valueAxesSettings but it doesn't work even I choose valueAxesSettings into valueAxes.
Furthermore, what the difference between valueAxesSettings and valueAxes, as the reference said If you change a property after the chart is initialized, you should call stockChart.validateNow() method in order for it to work.? what does it mean?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>My first stock chart</title>
<link rel="stylesheet" href="amcharts/style.css" type="text/css">
<script src="//www.amcharts.com/lib/3/amcharts.js"></script>
<script src="//www.amcharts.com/lib/3/serial.js"></script>
<script src="//www.amcharts.com/lib/3/themes/light.js"></script>
<script src="//www.amcharts.com/lib/3/amstock.js"></script>
<style>
#chartdiv {
width: 100%;
height: 500px;
font-size: 11px;
}
</style>
<script type="text/javascript">
AmCharts.makeChart( "chartdiv", {
"type": "stock",
"dataDateFormat": "YYYY-MM-DD",
"dataSets": [ {
"dataProvider": [ {
"date": "2011-06-01",
"val": 10
}, {
"date": "2011-06-02",
"val": 11
}, {
"date": "2011-06-03",
"val": 12
}, {
"date": "2011-06-04",
"val": 11
}, {
"date": "2011-06-05",
"val": 10
}, {
"date": "2011-06-06",
"val": 11
}, {
"date": "2011-06-07",
"val": 13
}, {
"date": "2011-06-08",
"val": 14
}, {
"date": "2011-06-09",
"val": 17
}, {
"date": "2011-06-10",
"val": 13
} ],
"fieldMappings": [ {
"fromField": "val",
"toField": "value"
} ],
"categoryField": "date"
} ],
"panels": [ {
"legend": {},
"stockGraphs": [ {
"id": "graph1",
"valueField": "value",
"type": "line",
"title": "MyGraph",
"fillAlphas": 0
} ]
} ],
"panelsSettings": {
"startDuration": 1
},
"categoryAxesSettings": {
"dashLength": 5
},
"valueAxesSettings": {
"dashLength": 13,
"guides": {
"value": 10,
"tovalue": 12,
"lineColor": "#CC0000",
"lineAlpha": 1,
"fillAlpha": 0.2,
"fillColor": "#CC0000",
"dashLength": 2,
"inside": true,
}
},
"chartScrollbarSettings": {
"graph": "graph1",
"graphType": "line",
"position": "bottom"
},
"chartCursorSettings": {
"valueBalloonsEnabled": true
},
"periodSelector": {
"periods": [ {
"period": "DD",
"count": 1,
"label": "1 day"
}, {
"period": "DD",
"selected": true,
"count": 5,
"label": "5 days"
}, {
"period": "MM",
"count": 1,
"label": "1 month"
}, {
"period": "YYYY",
"count": 1,
"label": "1 year"
}, {
"period": "YTD",
"label": "YTD"
}, {
"period": "MAX",
"label": "MAX"
} ]
}
} );
</script>
</head>
<body>
<div id="chartdiv"></div>
</body>
</html>
valueAxesSettings is a global version of valueAxes - anything you set in valueAxesSettings will be applied to all stock panels' valueAxes objects. If you want to override or set a specific setting in one of your panels' valueAxes, you can set a valueAxes inside the panel:
"panels": [{
"valueAxes":[{
//settings specific to this panel
}],
// ...
}, {
"valueAxes": [{
//settings specific to this panel
}]
}
The guides property is an array. You're setting it as a single object, which is incorrect. Also, the property is called toValue, not "tovalue" - the casing is important. Here's the corrected valueAxesSettings object:
"valueAxesSettings": {
"dashLength": 13,
"guides": [{
"value": 10,
"toValue": 12,
"lineColor": "#CC0000",
"lineAlpha": 1,
"fillAlpha": 0.2,
"fillColor": "#CC0000",
"dashLength": 2,
"inside": true
}]
},
Demo:
AmCharts.makeChart("chartdiv", {
"type": "stock",
"dataDateFormat": "YYYY-MM-DD",
"dataSets": [{
"dataProvider": [{
"date": "2011-06-01",
"val": 10
}, {
"date": "2011-06-02",
"val": 11
}, {
"date": "2011-06-03",
"val": 12
}, {
"date": "2011-06-04",
"val": 11
}, {
"date": "2011-06-05",
"val": 10
}, {
"date": "2011-06-06",
"val": 11
}, {
"date": "2011-06-07",
"val": 13
}, {
"date": "2011-06-08",
"val": 14
}, {
"date": "2011-06-09",
"val": 17
}, {
"date": "2011-06-10",
"val": 13
}],
"fieldMappings": [{
"fromField": "val",
"toField": "value"
}],
"categoryField": "date"
}],
"panels": [{
"valueAxes": [{
}],
"legend": {},
"stockGraphs": [{
"id": "graph1",
"valueField": "value",
"type": "line",
"title": "MyGraph",
"fillAlphas": 0
}]
}],
"panelsSettings": {
"startDuration": 1
},
"categoryAxesSettings": {
"dashLength": 5
},
"valueAxesSettings": {
"dashLength": 13,
"guides": [{
"value": 10,
"toValue": 12,
"lineColor": "#CC0000",
"lineAlpha": 1,
"fillAlpha": 0.2,
"fillColor": "#CC0000",
"dashLength": 2,
"inside": true
}]
},
"chartScrollbarSettings": {
"graph": "graph1",
"graphType": "line",
"position": "bottom"
},
"chartCursorSettings": {
"valueBalloonsEnabled": true
},
"periodSelector": {
"periods": [{
"period": "DD",
"count": 1,
"label": "1 day"
}, {
"period": "DD",
"selected": true,
"count": 5,
"label": "5 days"
}, {
"period": "MM",
"count": 1,
"label": "1 month"
}, {
"period": "YYYY",
"count": 1,
"label": "1 year"
}, {
"period": "YTD",
"label": "YTD"
}, {
"period": "MAX",
"label": "MAX"
}]
}
});
#chartdiv {
width: 100%;
height: 500px;
font-size: 11px;
}
<script src="//www.amcharts.com/lib/3/amcharts.js"></script>
<script src="//www.amcharts.com/lib/3/serial.js"></script>
<script src="//www.amcharts.com/lib/3/themes/light.js"></script>
<script src="//www.amcharts.com/lib/3/amstock.js"></script>
<div id="chartdiv"></div>
Regarding validateNow, if you change a property in your stock chart object, you need to call validateNow to redraw the chart with your new settings. validateData is primarily used when you make changes to your dataSets/dataProvider.