<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to include data strings in JSON chart tooltips? in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/how-to-include-data-strings-in-json-chart-tooltips/m-p/1311127#M5779</link>
    <description>&lt;P&gt;Hello! I am trying to create a simple JSON bar chart in the ESRI ArcGIS Online Hub pages. My data is very simple, each row is a unique date, a numeric value, and then a text comment (a string). Here's what it looks like:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Comment&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;7/24/2023&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;1541&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;"this is a made up comment!"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;7/23/2023&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;1442&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;"another made up text bit"&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Displaying the graph seems easy, but I want the text-based comment to display in the tooltip. I have figured out how to use the "overrides" feature to change the tooltip text and even include info like the y-axis value, but I can't figure out how to access the text strings and display them dynamically.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;{
  "type": "bar",
"overrides": {
  "graphs": [{
    "balloonText": "&amp;lt;strong&amp;gt;[[Comment]]&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;[[Actual_sum]]"
  }]
}
  "datasets": [
    {
      "name": "dataset1",
      "query": {
        "orderByFields": "Value_sum DESC",
        "groupByFieldsForStatistics": "Date",
        "outStatistics": [
          {
            "statisticType": "sum",
            "onStatisticField": "Value",
            "outStatisticFieldName": "Value_sum"
          }
        ]
      },
      "url": "https://XXX/FeatureServer/0"
    }
  ],
  "series": [
    {
      "source": "dataset1",
      "category": {
        "field": "Date",
        "label": "Date"
      },
      "value": {
        "field": "Value_sum",
        "label": "Value"
      }
    }
  ],
  "style": {
    "colors": [
      "#0079c1"
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Does anyone know how to do this? It seems like the easiest example, but I'm stumped.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2023 17:59:12 GMT</pubDate>
    <dc:creator>AndrewBurchill</dc:creator>
    <dc:date>2023-07-24T17:59:12Z</dc:date>
    <item>
      <title>How to include data strings in JSON chart tooltips?</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/how-to-include-data-strings-in-json-chart-tooltips/m-p/1311127#M5779</link>
      <description>&lt;P&gt;Hello! I am trying to create a simple JSON bar chart in the ESRI ArcGIS Online Hub pages. My data is very simple, each row is a unique date, a numeric value, and then a text comment (a string). Here's what it looks like:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Comment&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;7/24/2023&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;1541&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;"this is a made up comment!"&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;7/23/2023&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;1442&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;"another made up text bit"&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Displaying the graph seems easy, but I want the text-based comment to display in the tooltip. I have figured out how to use the "overrides" feature to change the tooltip text and even include info like the y-axis value, but I can't figure out how to access the text strings and display them dynamically.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt;{
  "type": "bar",
"overrides": {
  "graphs": [{
    "balloonText": "&amp;lt;strong&amp;gt;[[Comment]]&amp;lt;/strong&amp;gt;&amp;lt;br /&amp;gt;[[Actual_sum]]"
  }]
}
  "datasets": [
    {
      "name": "dataset1",
      "query": {
        "orderByFields": "Value_sum DESC",
        "groupByFieldsForStatistics": "Date",
        "outStatistics": [
          {
            "statisticType": "sum",
            "onStatisticField": "Value",
            "outStatisticFieldName": "Value_sum"
          }
        ]
      },
      "url": "https://XXX/FeatureServer/0"
    }
  ],
  "series": [
    {
      "source": "dataset1",
      "category": {
        "field": "Date",
        "label": "Date"
      },
      "value": {
        "field": "Value_sum",
        "label": "Value"
      }
    }
  ],
  "style": {
    "colors": [
      "#0079c1"
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Does anyone know how to do this? It seems like the easiest example, but I'm stumped.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 17:59:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/how-to-include-data-strings-in-json-chart-tooltips/m-p/1311127#M5779</guid>
      <dc:creator>AndrewBurchill</dc:creator>
      <dc:date>2023-07-24T17:59:12Z</dc:date>
    </item>
  </channel>
</rss>

