{"id":194273,"date":"2025-01-23T09:40:25","date_gmt":"2025-01-23T15:40:25","guid":{"rendered":"https:\/\/www.centralhealth.net\/?page_id=194273"},"modified":"2026-01-14T15:36:38","modified_gmt":"2026-01-14T21:36:38","slug":"provider-network-map","status":"publish","type":"page","link":"https:\/\/www.centralhealth.net\/ne\/provider-network-map\/","title":{"rendered":"\u092a\u094d\u0930\u0926\u093e\u092f\u0915 \u0928\u0947\u091f\u0935\u0930\u094d\u0915 \u0928\u0915\u094d\u0938\u093e"},"content":{"rendered":"<p><!-- Extra javascript so that tableau will fit on the page--><br \/>\n<script>\nimport {\n  TableauViz,\n  TableauEventType,\n} from \"https:\/\/public.tableau.com\/javascripts\/api\/tableau.embedding.3.latest.min.js\";<\/p>\n<p>let vizDiv,\n  currentWidth,\n  scalingFactor,\n  mediaQuery,\n  maxWidth, \/\/this is the max width as defined in the dashboard with Fixed size\n  activeSheet,\n  behaviour; \/\/dashboard behaviour when published to Tableau Server\/Cloud. \"Automatic\/Exactly\/Range\"<\/p>\n<p>\/\/set a breakpoint to switch between phone and desktop views.\nconst mediaQueryString = \"(max-width: 576px)\";<\/p>\n<p>\/\/Tableau Embed Code\nconst viz = new TableauViz();\n\/\/ viz.src =\n\/\/   \"https:\/\/10ax.online.tableau.com\/t\/eskibeta2dev674998\/views\/Regional_multi_size_tests\/Obesity_size_fixed\";\nviz.src =\n  \"https:\/\/public.tableau.com\/views\/Embed-and-Mobile-OptimizedSupestoreSalesDashboard\/SalesSummary\";\nviz.toolbar = \"hidden\";\n\/\/ viz.hideTabs = \"false\";\nvizDiv = document.getElementById(\"tableauViz\");\nvizDiv.appendChild(viz);\nviz.addEventListener(TableauEventType.FirstInteractive, ready);<\/p>\n<p>\/\/Once the viz is ready, check if it's a dashboard or a standalone worksheet.\n\/\/If it's dashboard AND behaviour = \"exactly\" (i.e. fixed height\/width), call scale\nfunction ready() {\n  console.log(\"Viz has loaded!\");\n  activeSheet = viz.workbook.activeSheet;\n  console.log(\"Active sheet:\", activeSheet.name);\n  console.log(\"Worksheet type:\", activeSheet.sheetType);\n  console.log(\"Workbook name:\", viz.workbook.name);\n  behaviour =\n    activeSheet._workbookImpl._activeSheetImpl._sheetInfoImpl._sheetSize\n      .behavior;<\/p>\n<p>  \/\/ determine what type of sheet it is, worksheet, dashboard or story\n  switch (activeSheet.sheetType) {\n    case \"worksheet\":\n      \/\/this is just a placeholder to show as example\n      break;\n    case \"dashboard\":\n      console.log(\"Found Dashboard!\");<\/p>\n<p>      \/\/ check dashboard size settings (exactly vs range vs automatic )\n      \/\/ note: this function isn't implemented in the api, so we need to access it via the prototype\n      \/\/ note2: width will not exist and will an error will be throuwn if size isn't set to exactly or range\n      if (behaviour === \"exactly\") {\n        maxWidth =\n          activeSheet._workbookImpl._activeSheetImpl._sheetInfoImpl._sheetSize\n            .maxSize.width;\n      }<\/p>\n<p>      \/\/check if we need to apply the 1st scaling on load (i.e. when size is fixed\/range and current screen size different than max\/min width )\n      \/\/ we'll also check if it's phone or mobile\n      currentWidth = vizDiv.offsetWidth;\n      mediaQuery = window.matchMedia(mediaQueryString);\n      if (mediaQuery.matches) {\n        \/\/ viz.device = \"phone\";\n        scaleViz(currentWidth, maxWidth, \"phone\");\n      } else {\n        scaleViz(currentWidth, maxWidth, \"desktop\");\n      }\n      break;\n    case \"story\":\n      \/\/this is just a placeholder to show as example\n      break;\n  }\n}<\/p>\n<p>\/\/ track any window resize events and whether it needs to change between phone\/desktop or if it needs to be scaled\nwindow.addEventListener(\"resize\", () => {\n  console.log(\n    \"Screen size is changing; mediaQuery.matches: \",\n    mediaQuery.matches\n  );<\/p>\n<p>  currentWidth = vizDiv.offsetWidth;<\/p>\n<p>  if (mediaQuery.matches) {\n    \/\/ if device change (from desktop\/default to phone), load 'phone' version and scale\n    if (viz.device === \"desktop\" || viz.device === \"default\") {\n      viz.device = \"phone\";\n      scaleViz(currentWidth, maxWidth, \"phone\");<\/p>\n<p>      \/\/ if no device changes, then just scale\n    } else {\n      scaleViz(currentWidth, maxWidth, \"phone\");\n    }\n  } else {\n    \/\/size change from phone to desktop\n    if (viz.device === \"phone\") {\n      viz.device = \"desktop\";<\/p>\n<p>      scaleViz(currentWidth, maxWidth, \"desktop\");<\/p>\n<p>      \/\/ if no device chang, then just scale\n    } else {\n      scaleViz(currentWidth, maxWidth, \"desktop\");\n    }\n  }\n});<\/p>\n<p>function scaleViz(currentWidth, maxWidth, deviceType) {\n  \/\/we're only apply scaling when view size is fixed\n  if (behaviour === \"range\") {\n    console.log(\n      \"Your dashboard is configured to use a Range, so you are on your own, we're not going to scale it. That's ok for mobile layouts, but for large screes we recommend using automatic or fixed size dashboards!\"\n    );\n  } else if (behaviour === \"exactly\") {\n    \/\/ sets the origin to scale from\n    vizDiv.style.transformOrigin = \"left top\";<\/p>\n<p>    \/\/ simple scaling factor\n    \/\/ e.g. if currentWidth = 900 and maxWidth = 1200, scaling factor is .75\n    scalingFactor = currentWidth \/ maxWidth;<\/p>\n<p>    \/\/ caps scaling factor so it only scales down; does not scale up (increase size of viz)\n    if (scalingFactor > 1) {\n      scalingFactor = 1;\n    }<\/p>\n<p>    \/\/ scaling is essentially disabled for mobile; will always be 1\n    if (deviceType === \"phone\") {\n      scalingFactor = 1;\n    }<\/p>\n<p>    \/\/ Finally scale the viz using the scalingFactor derived above\n    \/\/ log current parameters\n    console.log(\n      \"Current width: \" +\n        currentWidth +\n        \"; maxWidth: \" +\n        maxWidth +\n        \"; scalling Factor: \" +\n        scalingFactor +\n        \"; device= \" +\n        viz.device\n    );\n    \/\/apply CSS transform\n    vizDiv.style.transform = \"scale(\" + scalingFactor + \")\";<\/p>\n<p>    \/\/ tweak Flexbox to ensure the Tableau iframe content is always centered correctly to the page, regardless of scaling or device type\n    let elems = document.getElementsByTagName(\"tableau-viz\");\n    for (let i = 0; i < elems.length; i++) {\n      elems[i].style.justifyContent = \"center\";\n      if (scalingFactor === 1) {\n        elems[i].style.position = \"relative\";\n      } else {\n        elems[i].style.position = \"absolute\";\n      }\n    }\n\n    \/\/ After applying the CSS transform and other adjustments, set visibility to visible.\n    vizDiv.style.visibility = \"visible\";\n  }\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":59,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"class_list":["post-194273","page","type-page","status-publish","entry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/pages\/194273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/users\/59"}],"replies":[{"embeddable":true,"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/comments?post=194273"}],"version-history":[{"count":4,"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/pages\/194273\/revisions"}],"predecessor-version":[{"id":201804,"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/pages\/194273\/revisions\/201804"}],"wp:attachment":[{"href":"https:\/\/www.centralhealth.net\/ne\/wp-json\/wp\/v2\/media?parent=194273"}],"curies":[{"name":"\u0921\u092c\u094d\u0932\u094d\u092f\u0942\u092a\u0940","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}