{"id":217,"date":"2023-06-22T11:46:25","date_gmt":"2023-06-22T10:46:25","guid":{"rendered":"https:\/\/impacturalgarve.pt\/?page_id=217"},"modified":"2023-06-22T12:59:56","modified_gmt":"2023-06-22T11:59:56","slug":"teste-simulador","status":"publish","type":"page","link":"https:\/\/impacturalgarve.pt\/en\/teste-simulador\/","title":{"rendered":"teste simulador"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><form name=\"cp_calculatedfieldsf_pform_1\" id=\"cp_calculatedfieldsf_pform_1\" action=\"?\" method=\"post\" enctype=\"multipart\/form-data\" class=\"cff-form  persist-form\"  dir=\"ltr\" data-trp-original-action=\"?\">\n<input type=\"hidden\" name=\"cp_calculatedfieldsf_pform_psequence\" value=\"_1\" \/>\n<input type=\"hidden\" name=\"cp_calculatedfieldsf_id\" value=\"6\" \/><pre style=\"display:none !important;\"><script type=\"text\/javascript\">form_structure_1=[[{\"form_identifier\":\"\",\"name\":\"fieldname3\",\"shortlabel\":\"\",\"index\":0,\"ftype\":\"fdropdown\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Escolha o Aeroporto de Origem\",\"size\":\"medium\",\"required\":true,\"exclude\":false,\"toSubmit\":\"value\",\"merge\":0,\"choiceSelected\":\"\",\"select2\":false,\"multiple\":false,\"vChoices\":1,\"showDep\":false,\"choices\":[\"----- sem voo\",\"London LGW\",\"Dublin DUB\",\"Manchester MAN\",\"London STN\",\"Lisbon LIS\",\"-----ordem alfab\\u00e9tica\",\"Amsterdam\\u00a0AMS\",\"Basel\\u00a0BSL\",\"Belfast\\u00a0BFS\",\"Berlin\\u00a0BER\",\"Birmingham\\u00a0BHX\",\"Bordeaux\\u00a0BOD\",\"Bournemouth\\u00a0BOH\",\"Bristol\\u00a0BRS\",\"Brussels\\u00a0BRU\",\"Brussels\\u00a0CRL\",\"Cardiff\\u00a0CWL\",\"Cologne\\u00a0CGN\",\"Copenhagen\\u00a0CPH\",\"Cork\\u00a0ORK\",\"Dublin\\u00a0DUB\",\"Dusseldorf\\u00a0DUS\",\"East Midlands\\u00a0EMA\",\"Edinburgh\\u00a0EDI\",\"Eindhoven\\u00a0EIN\",\"Frankfurt\\u00a0FRA\",\"Geneva\\u00a0GVA\",\"Glasgow\\u00a0GLA\",\"Hamburg\\u00a0HAM\",\"Hannover\\u00a0HAJ\",\"Leeds\\u00a0LBA\",\"Lisbon\\u00a0LIS\",\"Liverpool\\u00a0LPL\",\"London\\u00a0LGW\",\"London\\u00a0LHR\",\"London\\u00a0LTN\",\"London\\u00a0STN\",\"Luxembourg\\u00a0LUX\",\"Lyon\\u00a0LYS\",\"Manchester\\u00a0MAN\",\"Marseille\\u00a0MRS\",\"Milan\\u00a0BGY\",\"Munich\\u00a0MUC\",\"Nantes\\u00a0NTE\",\"Newcastle\\u00a0NCL\",\"Nottingham\\u00a0EMA\",\"Paris\\u00a0BVA\",\"Paris\\u00a0CDG\",\"Paris\\u00a0ORY\",\"Porto\\u00a0OPO\",\"Prestwick\\u00a0PIK\",\"Rotterdam\\u00a0RTM\",\"Stockholm\\u00a0ARN\",\"Stuttgart\\u00a0STR\",\"Vienna\\u00a0VIE\",\"Zurich\\u00a0ZRH\"],\"optgroup\":[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false],\"choicesVal\":[\"0\",\"1685\",\"1828\",\"1868\",\"1773\",\"222\",\"0\",\"1968\",\"1727\",\"1965\",\"2388\",\"1783\",\"1059\",\"1605\",\"1648\",\"1831\",\"1790\",\"1638\",\"1947\",\"2538\",\"1648\",\"1828\",\"1965\",\"1831\",\"2132\",\"1917\",\"1957\",\"1550\",\"2113\",\"2305\",\"2198\",\"1933\",\"222\",\"1857\",\"1685\",\"1712\",\"1756\",\"1773\",\"1802\",\"1452\",\"1868\",\"1323\",\"1753\",\"2036\",\"1242\",\"2058\",\"1831\",\"1601\",\"1579\",\"1547\",\"473\",\"2071\",\"1923\",\"3117\",\"1899\",\"2340\",\"1778\"],\"choicesDep\":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname4\",\"shortlabel\":\"\",\"index\":1,\"ftype\":\"fradio\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Ida e volta?\",\"layout\":\"one_column\",\"required\":false,\"exclude\":false,\"readonly\":false,\"toSubmit\":\"value\",\"choiceSelected\":\"Ida e Volta - 2\",\"showDep\":false,\"untickAccepted\":false,\"onoff\":0,\"choices\":[\"Ida e Volta\",\"S\\u00f3 ida\"],\"choicesVal\":[\"2\",\"1\"],\"choicesDep\":[[],[]],\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname6\",\"shortlabel\":\"\",\"index\":2,\"ftype\":\"ffieldset\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"fields\":[\"fieldname5\",\"fieldname7\"],\"columns\":\"2\",\"rearrange\":0,\"title\":\"Dist\\u00e2ncia Percorrida transporte a\\u00e9reio\",\"collapsible\":false,\"defaultCollapsed\":true,\"collapsed\":false,\"selfClosing\":false,\"fBuild\":{},\"parent\":\"\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname1\",\"shortlabel\":\"\",\"index\":3,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"CO2 (kg) emitido por pessoa no transporte a\\u00e9reo\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"size\":\"medium\",\"eq\":\"ROUND(fieldname3*fieldname4*0.09471, 1)\",\"min\":\"\",\"max\":\"\",\"suffix\":\"\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\"\",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"fBuild\":{},\"parent\":\"\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname5\",\"shortlabel\":\"\",\"index\":4,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"km\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"size\":\"medium\",\"eq\":\"fieldname3*fieldname4\",\"min\":\"\",\"max\":\"\",\"suffix\":\" km\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\" \",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"fBuild\":{},\"parent\":\"fieldname6\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname7\",\"shortlabel\":\"\",\"index\":5,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"mi\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"size\":\"medium\",\"eq\":\"ROUND(fieldname3*fieldname4*0.6213712)\",\"min\":\"\",\"max\":\"\",\"suffix\":\" mi\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\" \",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"fBuild\":{},\"parent\":\"fieldname6\"},{\"form_identifier\":\"\",\"name\":\"fieldname9\",\"shortlabel\":\"\",\"index\":6,\"ftype\":\"ffieldset\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"fields\":[\"fieldname8\",\"fieldname12\",\"fieldname14\",\"fieldname11\",\"fieldname13\"],\"columns\":\"5\",\"rearrange\":0,\"title\":\"\",\"collapsible\":false,\"defaultCollapsed\":true,\"collapsed\":false,\"selfClosing\":false,\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname15\",\"shortlabel\":\"\",\"index\":7,\"ftype\":\"ffieldset\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"fields\":[\"fieldname16\",\"fieldname17\",\"fieldname18\",\"fieldname19\",\"fieldname20\"],\"columns\":\"5\",\"rearrange\":0,\"title\":\"\",\"collapsible\":false,\"defaultCollapsed\":true,\"collapsed\":false,\"selfClosing\":false,\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname14\",\"shortlabel\":\"\",\"index\":8,\"ftype\":\"fslider\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Dist\\u00e2ncia percorrida\",\"exclude\":false,\"readonly\":false,\"predefined\":\"\",\"predefinedMin\":\"\",\"predefinedMax\":\"\",\"predefinedClick\":false,\"size\":\"medium\",\"thousandSeparator\":\" \",\"centSeparator\":\"\",\"typeValues\":false,\"min\":0,\"max\":\"5000\",\"step\":\"100\",\"marks\":false,\"divisions\":5,\"range\":false,\"logarithmic\":false,\"caption\":\"{0}\",\"minCaption\":\"\",\"maxCaption\":\"\",\"fBuild\":{},\"parent\":\"fieldname9\"},{\"form_identifier\":\"\",\"name\":\"fieldname18\",\"shortlabel\":\"\",\"index\":9,\"ftype\":\"fslider\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Dist\\u00e2ncia percorrida\",\"exclude\":false,\"readonly\":false,\"predefined\":\"\",\"predefinedMin\":\"\",\"predefinedMax\":\"\",\"predefinedClick\":false,\"size\":\"medium\",\"thousandSeparator\":\" \",\"centSeparator\":\"\",\"typeValues\":false,\"min\":0,\"max\":\"5000\",\"step\":\"100\",\"marks\":false,\"divisions\":5,\"range\":false,\"logarithmic\":false,\"caption\":\"{0}\",\"minCaption\":\"\",\"maxCaption\":\"\",\"fBuild\":{},\"parent\":\"fieldname15\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname13\",\"shortlabel\":\"\",\"index\":10,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"CO2 (kg)\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"size\":\"medium\",\"eq\":\"ROUND(fieldname8*fieldname14\\\/fieldname11*0.1\\\/fieldname12)\",\"min\":\"\",\"max\":\"\",\"suffix\":\"\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\"\",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"fBuild\":{},\"parent\":\"fieldname9\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname20\",\"shortlabel\":\"\",\"index\":11,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"CO2 (kg)\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"size\":\"medium\",\"eq\":\"ROUND(fieldname16*fieldname18\\\/fieldname17*0.16\\\/fieldname19)\",\"min\":\"\",\"max\":\"\",\"suffix\":\"\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\"\",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"fBuild\":{},\"parent\":\"fieldname15\"},{\"form_identifier\":\"\",\"name\":\"fieldname11\",\"shortlabel\":\"\",\"index\":12,\"ftype\":\"fdropdown\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Unidade\",\"size\":\"medium\",\"required\":false,\"exclude\":false,\"toSubmit\":\"value\",\"merge\":0,\"choiceSelected\":\"First Choice - First Choice\",\"select2\":false,\"multiple\":false,\"vChoices\":1,\"showDep\":false,\"choices\":[\"km\",\"mi\"],\"optgroup\":[false,false],\"choicesVal\":[\"1\",\"0.6213712\"],\"choicesDep\":[[],[]],\"fBuild\":{},\"parent\":\"fieldname9\"},{\"form_identifier\":\"\",\"name\":\"fieldname19\",\"shortlabel\":\"\",\"index\":13,\"ftype\":\"fdropdown\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Unidade\",\"size\":\"medium\",\"required\":false,\"exclude\":false,\"toSubmit\":\"value\",\"merge\":0,\"choiceSelected\":\"First Choice - First Choice\",\"select2\":false,\"multiple\":false,\"vChoices\":1,\"showDep\":false,\"choices\":[\"km\",\"mi\"],\"optgroup\":[false,false],\"choicesVal\":[\"1\",\"0.6213712\"],\"choicesDep\":[[],[]],\"fBuild\":{},\"parent\":\"fieldname15\"},{\"form_identifier\":\"\",\"name\":\"fieldname8\",\"shortlabel\":\"\",\"index\":14,\"ftype\":\"fcheck\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Tipo de viatura\",\"layout\":\"one_column\",\"required\":false,\"exclude\":false,\"readonly\":false,\"toSubmit\":\"value\",\"merge\":1,\"onoff\":0,\"max\":-1,\"maxError\":\"Check no more than {0} boxes\",\"showDep\":false,\"choices\":[\"at\\u00e9 5 lugares\"],\"choicesVal\":[\"1\"],\"choiceSelected\":[false],\"choicesDep\":[[]],\"fBuild\":{},\"parent\":\"fieldname9\"},{\"form_identifier\":\"\",\"name\":\"fieldname16\",\"shortlabel\":\"\",\"index\":15,\"ftype\":\"fcheck\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"Tipo de viatura\",\"layout\":\"one_column\",\"required\":false,\"exclude\":false,\"readonly\":false,\"toSubmit\":\"value\",\"merge\":1,\"onoff\":0,\"max\":-1,\"maxError\":\"Check no more than {0} boxes\",\"showDep\":false,\"choices\":[\"9 lugares\"],\"choicesVal\":[\"1\"],\"choiceSelected\":[false],\"choicesDep\":[[]],\"fBuild\":{},\"parent\":\"fieldname15\"},{\"form_identifier\":\"\",\"name\":\"fieldname12\",\"shortlabel\":\"\",\"index\":16,\"ftype\":\"fslider\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"passageiros\",\"exclude\":false,\"readonly\":false,\"predefined\":\"\",\"predefinedMin\":\"\",\"predefinedMax\":\"\",\"predefinedClick\":false,\"size\":\"medium\",\"thousandSeparator\":\"\",\"centSeparator\":\"\",\"typeValues\":false,\"min\":\"1\",\"max\":\"5\",\"step\":1,\"marks\":false,\"divisions\":5,\"range\":false,\"logarithmic\":false,\"caption\":\"{0}\",\"minCaption\":\"\",\"maxCaption\":\"\",\"fBuild\":{},\"parent\":\"fieldname9\"},{\"form_identifier\":\"\",\"name\":\"fieldname17\",\"shortlabel\":\"\",\"index\":17,\"ftype\":\"fslider\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"passageiros\",\"exclude\":false,\"readonly\":false,\"predefined\":\"\",\"predefinedMin\":\"\",\"predefinedMax\":\"\",\"predefinedClick\":false,\"size\":\"medium\",\"thousandSeparator\":\"\",\"centSeparator\":\"\",\"typeValues\":false,\"min\":\"1\",\"max\":\"9\",\"step\":1,\"marks\":false,\"divisions\":5,\"range\":false,\"logarithmic\":false,\"caption\":\"{0}\",\"minCaption\":\"\",\"maxCaption\":\"\",\"fBuild\":{},\"parent\":\"fieldname15\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname21\",\"shortlabel\":\"\",\"index\":18,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"CO2 (kg) emitidos por pessoa no transporte rodovi\\u00e1rio\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"size\":\"medium\",\"eq\":\"fieldname13+fieldname20\",\"min\":\"\",\"max\":\"\",\"suffix\":\"\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\"\",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"fBuild\":{},\"parent\":\"\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname22\",\"shortlabel\":\"\",\"index\":19,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"title\":\"TOTAL CO2 (kg) EMITIDOS POR PESSOA ASSOCIADO AOS TRANSPORTES\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"size\":\"medium\",\"eq\":\"fieldname1+fieldname13+fieldname20\",\"min\":\"\",\"max\":\"\",\"suffix\":\"\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\"\",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"fBuild\":{},\"parent\":\"\"}],{\"0\":{\"title\":\"CO2 dos meios de transporte por turista\",\"description\":\"C\\u00e1lculo do CO2 resultante da utiliza\\u00e7\\u00e3o de meios de transporte de e para o destino e pelas desloca\\u00e7\\u00f5es durante o per\\u00edodo de f\\u00e9rias\",\"formlayout\":\"top_aligned\",\"formtemplate\":\"cp_cff_14\",\"animate_form\":1,\"evalequations\":1,\"evalequations_delay\":0,\"evalequationsevent\":2,\"direction\":\"ltr\",\"loading_animation\":1,\"autocomplete\":1,\"persistence\":1,\"animation_effect\":\"fade\",\"customstyles\":\"\"},\"formid\":\"cp_calculatedfieldsf_pform_1\"}];<\/script><\/pre>\n<div id=\"fbuilder\">\n\t<div class=\"cff-processing-form\"><\/div>\t<div id=\"fbuilder_1\">\n\t\t<div id=\"formheader_1\"><\/div>\n\t\t<div id=\"fieldlist_1\"><\/div>\n\t\t<div class=\"clearer\"><\/div>\n\t<\/div>\n<\/div>\n<div class=\"clearer\"><\/div>\n<input type=\"hidden\" name=\"trp-form-language\" value=\"en\"\/><\/form>\n\t<\/p>\n\n\n\n<!-- <input id=\"fieldname1_1\"  > kg Co2 avi\u00e3o -->\n\n\n\n<script type=\"text\/javascript\" src=\"https:\/\/www.gstatic.com\/charts\/loader.js\"><\/script>\n  <script type=\"text\/javascript\">\n    \/\/ Load the Google Charts library\n    google.charts.load('current', { 'packages': ['corechart'] });\n\n    \/\/ Set a default minimum and maximum year\n    var minYear = 2018;\n    var maxYear = 2021;\n\n    \/\/ Draw the chart when the library is loaded\n    google.charts.setOnLoadCallback(drawChart);\n\n    function drawChart() {\n      \/\/ Define the chart data\n      var originalData = google.visualization.arrayToDataTable([\n        ['Year', 'Sales'],\n        ['2018', 1000],\n        ['2019', 1170],\n        ['2020', 660],\n        ['2021', 1030]\n      ]);\n\n      \/\/ Filter the data based on the minimum and maximum year\n      var data = new google.visualization.DataTable();\n      data.addColumn('string', 'Year');\n      data.addColumn('number', 'Sales');\n      var rows = originalData.getFilteredRows([{ column: 0, minValue: minYear, maxValue: maxYear }]);\n      rows.forEach(function (row) {\n        data.addRow([originalData.getValue(row, 0), originalData.getValue(row, 1)]);\n      });\n\n      \/\/ Set chart options\n      var options = {\n        title: 'Sales by Year',\n        chartArea: { width: '50%' },\n        hAxis: {\n          title: 'Year',\n          minValue: minYear,\n          maxValue: maxYear\n        },\n        vAxis: {\n          title: 'Sales'\n        }\n      };\n\n      \/\/ Instantiate and draw the chart\n      var chart = new google.visualization.BarChart(document.getElementById('chart_div'));\n      chart.draw(data, options);\n    }\n\n    function updateChart() {\n      \/\/ Get the minimum and maximum year values from the text boxes\n      minYear = parseInt(document.getElementById('min_year').value);\n      maxYear = parseInt(document.getElementById('fieldname21_1').value);\n\n      \/\/ Redraw the chart\n      drawChart();\n    }\n  <\/script>\n<!-- Display the text boxes and chart -->\n  <div>\n    <label for=\"min_year\">Minimum Year:<\/label>\n    <input onchange=\"updateChart()\" type=\"number\" id=\"min_year\" value=\"2018\">\n    <label for=\"max_year\">Maximum Year:<\/label>\n    <input onchange=\"updateChart()\" type=\"number\" id=\"fieldname21_1\" >\n  <!--  <button onclick=\"updateChart()\">Update Chart<\/button> -->\n  <\/div>\n  <div id=\"chart_div\" style=\"width: 600px; height: 400px;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Minimum Year: Maximum Year:<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-217","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/pages\/217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/comments?post=217"}],"version-history":[{"count":27,"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/pages\/217\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/pages\/217\/revisions\/266"}],"wp:attachment":[{"href":"https:\/\/impacturalgarve.pt\/en\/wp-json\/wp\/v2\/media?parent=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}