Toucan 3.0
YouPrep documentationHelp centerGet a demo
  • Welcome
    • 👋Welcome to Toucan
    • ⚙️Technical resources
      • ⚙️Toucan stack
      • Setup mode
        • Toucan SaaS mode
      • ⚙️Security
        • Application Security
        • Source Code Quality
        • Global Security Practices
        • Security of Docker Images
  • TUTORIALS
    • 📊Getting Started : Embedded Analytics
    • 🤓Advanced tutorials
      • Embedding a story with user attributes
        • Dynamic filter with user attributes
        • Dynamic Tables
        • Dynamic Database
        • Dynamic Host
      • Using the HTTP API connector in advanced use cases
      • Using advanced syntax for SQL queries
      • Merging filters with our tool
      • Deep customization chart (CSS)
        • Homepage customization
        • Chart customization
        • Dashboard customization
  • Data Management
    • 🧮Overview of Data In Toucan
    • 📡Datasources in Toucan
      • 🔌Managing Connectors
        • 🔌Creating, editing and deleting a connector
        • 🔌Set up OAuth2 credentials for your platform
        • 🔌Setting up a connector
          • 🔌Generic Connectors
            • 🔌Setting up an HTTP API connector
            • 🔌Setting up an ODBC Connector
          • 🔌Database and data warehouse Connectors
            • 🔌Setting up an AWS Redshift Connector
            • 🔌Setting up a Snowflake Connector
            • 🔌Setting up a PostgreSQL Connector
            • 🔌Setting up a Google Big Query Connector
            • 🔌Setting up an AWS Athena connector
            • 🔌Setting up a MySQL connector
            • 🔌Setting up a MongoDB connector
            • 🔌Setting up a Microsoft SQL Server connector
            • 🔌Setting up an Azure SQL connector
            • 🔌Setting a Databricks Connector
            • 🔌Setting up a ElasticSearch Connector
            • 🔌Setting up a Clickhouse Connector
          • 🔌Online services connectors
            • 🔌Setting up a Sharepoint Connector
            • 🔌Setting up a Google Sheets Connector
            • 🔌Setting up a Salesforce Connector
            • 🔌Setting up a Hubspot Connector
          • 🔌Setting up an AWS S3 connector
      • 📁Managing Files
        • 📁Adding, editing and deleting local files
        • 📂Using advanced file settings
        • 📁Adding and combining remote files in Toucan
    • 🔢Datasets in Toucan
      • 🔢Stored and Live Datasets
      • 💿Managing datasets
        • 🔢Creating datasets
        • 🔢Editing, Duplicating and Deleting a dataset
        • 🔢Refreshing and Publishing Datasets
        • 📈Optimize data performance
        • 🗂️Adding indexes to stored datasets
        • 👩‍💻Code mode and single mode
      • 🛑Setting permissions on dataset
      • 🗃️Maintaining Data
        • 🗃️Tagging datasets
        • 🗃️Identifying datasets dependencies
        • 🗃️Set validation rules
    • 🧑‍🍳Preparing data
      • Overview of YouPrep™
        • 🎹Column header
          • Rename column
          • Duplicate column
          • Fill null values
          • Replace values
          • Sort values
          • Convert columns data types
        • Add
          • Add text column
          • Add formula column
          • Add conditional column
        • Filter
          • Delete columns
          • Keep columns
          • Filter rows
          • Top N rows
          • ArgMax
          • ArgMin
        • Aggregate
          • Group by
          • Add total rows
          • Hierarchical rollup
          • Get unique groups/values
        • Compute
          • Compute evolution
          • Cumulated sum
          • Percentage of total
          • Rank
          • Moving average
          • Compute statistics
          • Absolute value
        • Text
          • Concatenate
          • Split column
          • Extract substring
          • To lowercase
          • To uppercase
          • Compare text columns
          • Trim spaces
          • Replace text
        • Date
          • Convert text to date
          • Convert date to text
          • Extract date information
          • Add missing dates
          • Compute duration
        • Reshape
          • Pivot
          • Unpivot
          • Waterfall
        • Combine
          • Append datasets
          • Join datasets
        • Geo
          • Geographic dissolve
          • Geographic hierarchy
          • Geographic simplify
          • Prepare geo data (with basemap)
      • YouPrep™ Native SQL
      • Hybrid pipeline
    • ➿Managing variables in Toucan
      • ➿Variables hub
      • ♈Use variables in YouPrep™
      • ➿Easy reference to variables
    • 🧞Using advanced data concepts
      • 🧞Data personnalisation with user attributes
        • Connector setup with a user attribute
        • Database selection with a user attribute
        • YouPrep data filtering with a user attribute
        • Filter data in SQL with a user attribute
      • 🧞Advanced syntax for variables
      • 🧞Data cache
  • Visualizations and Layouts
    • 📺Apps
      • 📺Managing Apps
        • ➕Creating Apps
        • 📄Duplicating Apps
        • 🖨️Publishing Apps
        • 🚮Deleting Apps
        • ✍️Editing within an App
      • 🖌️Customizing Apps
        • Customizing chart color elements
        • Customizing the app's font
        • Adding Assets
        • Adding Glossary
        • Setting up, Managing and testing custom visibilities
        • Customizing the "no data error" message
        • Creating a dynamic background based on an Filter's column
      • 🏠Home
        • Creating the Home
        • Creating Tiles
          • Tile Dynamic Value
          • Tile Leaderboard
          • Tile Line
          • Tile Scorecard
          • Tile Bullet
          • Tile Heatmap
          • Tile PDF
          • Tile Video
          • Tile Image
          • Tile Text
          • Tile HTML
          • Tile Separator
      • ✨Stories
        • Creating a Story
        • KPIs
        • Narrative
        • Crossfilter
      • 📽️Filters
        • Managing Filters
          • Creating, reusing and editing Filters
          • Applying Filters
          • Unpinning and deleting Filters
        • Type of Filters
          • Dropdown
          • Checkboxes
          • Buttons
          • Date Range
          • Hierarchical
          • Slider
        • Templating from Filters' values
        • Dependant Filters
      • 📈PDF Report
      • 🎡Datawall
      • 🏗️Dashboard Builder
        • Create a Dashboard Builder
        • Embed a Dashboard Builder
        • Dashboard export options
      • 🌟MyFavorites
    • 📊Creating Visualizations
      • 🤩Viz Gallery
        • Barchart
        • Barlinechart
        • Bubblechart
        • Bulletchart
        • Circularchart
        • Funnelchart
        • Gantt chart
        • Heatmap
        • HTML
        • Leaderboard
        • Leaderboard Centered Average
        • Linechart
        • Mapchart
          • Configure a drill
        • Mediachart
        • Radarchart
        • Tablechart
        • Timeline
        • Versuschart
        • Waterfallchart
        • Score Card
        • Stacked Barchart
      • 🧠Common Chart Configuration
      • 💅Customizing chart colors
      • 🧞‍♂️Advanced chart configuration
        • Templating from chart's dataset
        • Add units, precisions and sentiments
        • Adding Tutorials
        • Add sparklines
        • Navigate with stories
        • Group informations in your stories
        • Multiple charts in one story
        • Manage dates
        • Customize tiles' sources
        • Add stars to tiles' title
        • Manage data order in your tiles
        • Navigate with tiles
    • 👩‍💻Embedding
      • 🔐Authentication
      • 🖇️Integration
        • Generate and manage embeds
        • Customize embeds
        • Embedding a Toucan App Using iFrames
        • Passing Extra Variables to Your Toucan Embed
      • ⚙️Embed SDK
        • Embed SDK Authentication
      • ❓FAQ
    • 🙋Self-Service
      • Self-Service Dashboard
      • Self-service PDF Report
  • Collaboration
    • ⏰Creating alerts
    • 📧Managing notifications
    • ➕Enriching a story with descriptions
    • 💌Sharing content
    • 💬Adding comments to stories
  • Administration
    • Page
    • ⚙️Instance Management
      • ⚙️Managing operations in SaaS
      • ⚙️Customizing your instance (whitelabel)
    • 👥Managing Users
      • 👥Users
      • 👥Managing user groups
      • 👥Managing user properties
      • 👥Setting up permissions and visibilities
    • 🌐Managing languages in Toucan (internationalisation)
    • 📈Monitoring Engagement with User Analytics
      • 🎛️How to Filter your User Analytics?
      • 🖥️Understanding your User Analytics Dashboards
  • Additional Ressources
    • 📚External documentation
    • 🚁Support for App-builders
    • 🆕Latest releases
      • 🎁2025 Releases
      • 🎁2024 Releases
      • 🎁2023 Releases
    • 🔧Troubleshooting
      • Troubleshoot:: DataHub
      • Cross-Site Cookies
      • How to :: read the inspector error
      • How to :: troubleshoot the toucan way
Powered by GitBook
On this page
  • Overview¶
  • Options¶
  • Code mode sample¶
  • How to :: add sparklines to your charts
  • Overview
  • Step 1 : Build you chart

Was this helpful?

  1. Visualizations and Layouts
  2. Creating Visualizations
  3. Advanced chart configuration

Add sparklines

Sparklines reference

Last updated 1 year ago

Was this helpful?

Represent the trend of a metric with a small line

Overview¶

📖 Find tutorial on the sparklines .

Warning

Only available for:

  • horizontal barcharts

  • leaderboards centered average

  • scorecards

  • bulletcharts

Options¶

Available in studio¶

parameters
label
type
optional
description
choices

value

string

Column containing the line value

date

array

Column containing the time dimension

dateFormat

Date display format

string

True

Optional. Use d3 time format (like ‘%Y’ to display just years)

legend

string

True

Type in a legend

commonScatter

Common scale

boolean

True

Use the same scale for all sparklines (y axis)

showMissingValues

Show missing values

boolean

True

Display missing values as blank/white lines. By default missing values are filtered out to display a continuous line

prefix

string

True

Optional. Add a prefix to value display.

forceLexicalOrder

Automatic date ordering

boolean

True

Set to false to force lexical reordering of ordinal dates

Code mode sample¶

charts: [
  [...]
  sparklines:
    orderDates: true
    value: ""
    date: ""
]

How to :: add sparklines to your charts

Overview

Sparklines are used to represent the trend of a metric with a small line.

This option requires to use the code mode for the step 2. Don’t worry, just follow this tutorial and you’ll have your sparklines setup in no time 🙏

Follow along this tutorial with the Story Tuto :: Sparklines in the Advanced Stories of your Demo App.

Step 1 : Build you chart

To add sparklines in a story, first you should… build a story.

Sparklines are an option available for the following charts :

  • leaderboards (horizontal barcharts)

  • leaderboards centered average

  • scorecards

  • bulletcharts

Use the Studio to select your dataset and create one of the chart listed above. Easy ! 🧸

In our example, our leaderboard dataset (tuto_sparlkines_leaderboard) looks like this :

Product
evolution
value
pack

Product 1

0.7

71.69397184

group1

Product 2

0

85.69342131

group1

Product 3

1.8

73.15038154

group2

Product 4

2.2

29.78448854

group2

Product 5

-0.3

7.116178841

group2

Warning

This option is only available in code mode for now.

To create sparklines, you need to create a relationship between two datasets:

  • the one from your chart

  • the one from your sparklines

To which bars of the leaderboard my sparklines data go to? We call this parameter history.

For example, a historical/sparklines dataset (tuto_sparlkines) could look like in our example:

date
Product
value

1/1/20

Product 1

77.3

1/2/20

Product 1

78.5

1/3/20

Product 1

79.3

1/1/20

Product 2

87.4

1/2/20

Product 2

86.2

1/3/20

Product 2

84.5

and remember, our leaderboard dataset (tuto_sparlkines_leaderboard) looks like this :

Product
evolution
value
pack

Product 1

0.7

71.69397184

group1

Product 2

0

85.69342131

group1

Product 3

1.8

73.15038154

group2

Product 4

2.2

29.78448854

group2

Product 5

-0.3

7.116178841

group2

Switch to code mode¶

From the Story level, switch to code mode.

Find the dataset parameter¶

In code mode you see the code version of everything you do in the Studio.

You’ll find a datasets block of code. This is where we define what data we used to build the leaderboard.

Define an historical dataset¶

Now we are going to define another dataset that contains your sparklines data and how it’s link to our leaderboard data.

You need to add a history block in your dataset configuration.

datasets:
  my_dataset:
    query: [...]
    pipeline: [...]
    history:

In the data attribute, you have to specify the query needed to retrieve the historical data, what data source contains your sparklines values. In our example, the domain is the tuto_sparklines dataset.

datasets:
  my_dataset:
    query: [...]
    pipeline: [...]
    history:
      data:
        query:
          domain: "tuto_sparklines"

Note

All parameters available for querying a dataset are available there: postprocess, multiple_queries,… NB: If you want to retrieve an existing dataset to use it as a sparkline, then you need to copy your dataset’s query and paste it on the history >> data >> query block.

joins specifies a list of columns to match dataset rows with their historical ones. So on which column you can do the match between your 2 datasets.

Both datasets must have the same columns header and same values (case sensitive) for the joins to work.

datasets:
  my_dataset:
    query: [...]
    pipeline: [...]
    history:
      data:
        query:
          domain: "tuto_sparklines"
      joins: [
        "Product"
      ]

Important

Filters can be applied to the history dataset. Make sure to add the column filter’s name in the join parameter.

In our example both datasets tuto_sparklines and tuto_sparklines_leaderboard have the same Product column. This allows the matching of the sparklines data and the leaderboard bars.

Find the datasets we used to build our leaderboard in our example.

📊
🧞‍♂️
here
here
Tuto :: Sparklines