days names and localization

18 views
Skip to first unread message

Andrea Borruso

unread,
Apr 12, 2020, 11:38:41 AM4/12/20
to vega-js
Hi all,
the days name are by default in English (mon, sat, fri, etc.).

Is it possible to set another locale for visualization of months and days names?

Thank you

Dominik Moritz

unread,
Apr 12, 2020, 1:16:20 PM4/12/20
to Andrea Borruso, vega-js
Yes, you can set the locale: https://vega.github.io/vega/docs/api/locale/. I think right now you can't set the locale from the spec itself. 

--
You received this message because you are subscribed to the Google Groups "vega-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vega-js+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vega-js/60fbe239-8d03-46df-9d7e-3ed709b622e5%40googlegroups.com.

andy

unread,
Apr 12, 2020, 1:26:22 PM4/12/20
to Dominik Moritz, vega-js
I think it's necessary to add that I need to find a way to use it in vega-lite.

I do not find locale settings in it. Am I missing something?

And thank you very much Dominik
--
___________________

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326
___________________

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno, 
e farlo durare, e dargli spazio"

Italo Calvino

Dominik Moritz

unread,
Apr 12, 2020, 1:39:11 PM4/12/20
to andy, vega-js
Since Vega-Lite compiles to Vega, you can set the locale on Vega and it will work for Vega-Lite as well. Does that make sense?

andy

unread,
Apr 12, 2020, 2:24:36 PM4/12/20
to Dominik Moritz, vega-js
Hi Dominik,
these are my first steps (below my fist result), and this is an incredible tool.

I'm using vega-lite in a simple webpage, adding

```html
  <script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
  <script src="https://cdn.jsdelivr.net/npm/vega-lite@4"></script>
  <script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
```

On Sun, 12 Apr 2020 at 19:39, Dominik Moritz <domo...@gmail.com> wrote:
Since Vega-Lite compiles to Vega, you can set the locale on Vega and it will work for Vega-Lite as well. Does that make sense?

Then I do not have Vega in my PC. Do I must install it and compile a localized version of   Vega-Lite?
I know probably I do not have understood anything and this is stupid question :)

Thank you


image.png
 

Dominik Moritz

unread,
Apr 12, 2020, 4:20:20 PM4/12/20
to andy, vega-js

andy

unread,
Apr 12, 2020, 4:23:36 PM4/12/20
to Dominik Moritz, vega-js
You e very kind, thank you very much!!

______
Scusami per la brevità, ti sto scrivendo dal cellulare.

website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E EPSG:4326
Reply all
Reply to author
Forward
0 new messages