palantir-foundryfoundry-contour

How do I insert free text/arrows into a bar chart in Contour to identify specific events that happened on a specific date?


I have a bar chart with exact dates over several years (ex: January 1st, 2016 to February 30th, 2019) on the x-axis and the number of events per day on the y-axis (ex: number of gatherings). On this bar chart, I am trying to also indicate certain dates on which some type of change occurred (ex: a fair opened causing an increase in events). I want to be able to indicate this either with a colored line on the bar chart and a legend on the side explaining the change corresponding with that color (ex: purple line marked on January 3rd, 2016. legend shows purple line with explanation: "fair opened") or an arrow marking that date with the text relating to that event (ex: "fair opened" with arrow pointing to/from January 3rd, 2016). I'm not sure how to go about doing this (would this require uploading a dataset into contour?). I'm pretty new to Contour, so any help is appreciated!


Solution

  • In general, Foundry is quite strongly opinionated that things should be backed by "data", so if you want to keep track of and display events in your charts, you'll want a dataset holding your event data.

    The quickest way to go about this would be to create a new Fusion sheet and sync a table region to a dataset. You can then copy/paste or simply manually enter data into the spreadsheet and it will update the related dataset. In Contour, you can then add an Overlay to your existing chart and point it to the dataset holding your events. If you make this a scatterplot layer, you can, for example get a circle drawn on the chart where each event takes place.

    There is much more robust support for timeseries and event type data once your data is incorporated into the Ontology layer, where you can use Quiver and Vertex for more complex visual analysis and dashboard building. If you're just interested to explore these features of the platform, check out the first few courses in the APPDEV series which will introduce you to the Ontology layer and the basics of Quiver.