Change language of timeline-stripplot
See original GitHub issueHey dear all,
I really love what you guys provide with Altair and it is a lot of fun to play around with it. I was wondering, if there is a way to change ticks on a timeline-stripplot into another languages datetime-format (in my case German). I have tried just changing the locale but that had no effect on the graph. Is there a way to custom-map axis ticks from the data-values in the dataset to something converted without the order of the ticks being scrambled up?
Again thank you so much for all your work
alt.Chart(terrordata,
description='Shows the frequency of terror attacks between two countries.',
).mark_tick(tickThickness=1.5, font="arial").encode(
x=alt.X('date:T',axis=alt.Axis(format='%B %Y',title='', labelAngle=0, axisWidth=0,ticks=4, orient="top",)),
y=alt.Y('country:N',axis=alt.Axis(title='', axisWidth=0), font="Helvetica Neue", fontsize=20),
color=alt.Color("casualties:Q",
legend=alt.Legend(
title='Todeszahlen',
titleFont="s-font-serif",
titleFontWeight="12",
),
scale=alt.Scale(
domain=['0', '5'],
range=['#ffb6b6', '#e23b3c'],
),
),).configure_cell( width=800).configure_scale(bandSize=100).configure_axis(
titleFont="s-font-serif",
titleFontSize=16,
tickLabelFont="s-font-serif",
tickLabelFontSize=12,
tickSize=0
)
Issue Analytics
- State:
- Created 6 years ago
- Comments:32 (19 by maintainers)
Top Results From Across the Web
Hardwired..for tidy text - R-bloggers
Hello, R users! This week we're continuing to bridge the gap between computers and human language with the launch Sentiment Analysis in R:...
Read more >How To Set Time Axes Labels (Ticks) Based On German Locale
An algorithm using R language has been developed for constructing Computer ... I was wondering if there is a way to change ticks...
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
For time format locale, you can pass a dict object from https://github.com/d3/d3-time-format/tree/master/locale to the embed options. For example:
It might be worth adding some convenience functions to Altair and put some examples in the documentation.
Vega-Embed 6.1.0 supports formatLocale and timeFormatLocale. I think this issue can be closed.