Format multi tooltip
See original GitHub issueHello, I cannot find a way to provide a format for each field of a multi tooltip. Here is a reproducible example :
import pandas as pd
import numpy as np
import altair as alt
np.random.seed(14)
data = pd.DataFrame({"date": pd.date_range("2018-01-01", periods=100),
"values": np.random.normal(size=100)})
alt.Chart(data).mark_point().encode(
x="date:T",
y="values:Q",
tooltip=alt.Tooltip(['date:T', 'values:Q'], format='.2f')
)
Which formats also the date field: If I try something like
alt.Tooltip(['date:T', 'values:Q'], format=['%d/%m/%Y', '.2f'])
I have an error saying that format is not a string.
So, how can I specify the format of each field in this multi tooltip ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Multiple Series - Tooltip format - Highcharts official support forum
I'm using high stock to represent multi series zoomable chart. In this case, I want to group the tooltip into a single tooltip...
Read more >how to add formatter tooltip in echart for multiple values for pie ...
I am using echart pie diagram but I want to show multiple records in tooltip. option = { tooltip ...
Read more >Multiple y-axis - different tooltip formats - CodePen
CSS ; 1. #chart { ; 2. max-width: 650px; ; 3. margin: 35px auto; ; 4. } ; 5. .
Read more >PDF form fields | Add tooltips, data and time, reqired/optional ...
Learn how to use form fields properties to add tooltip, date & time, required or not required, multi-line text, and calculated values in...
Read more >How to customize tooltips - Datawrapper Academy
Emphasize text with HTML · Create a mini-table · Add extra information about certain regions · Add two numbers together · Change the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can set the encoding to a list of
alt.Tooltip
objects, each with their own format string:Just for additional information, if you need to show
DateTime
format in your tooltip, you could refer to this d3-time-format