Comments (6)
Hi @leonarddevries ,
Great to hear you like the project! In general, you can set the language
part just by setting the Local_ID in Angular. It uses this one for the Charts locale. That's a missing part in the Readme at least.
I am, however, not entirely sure if that's a good solution because it could be that the GoogleCharts package uses different language tags than GoogleCharts.
If you could try it out and verify if it's working (or not), that would be great!
from angular-google-charts.
Hi @FERNman, Thanks for your response. And yes I can confirm setting the LOCALE_ID works! 😄 For anyone else trying to set the locale, these are the necessary changes to your app.module.ts
file:
import {LOCALE_ID, NgModule} from '@angular/core';
import localeNl from '@angular/common/locales/nl';
import {registerLocaleData} from '@angular/common';
registerLocaleData(localeNl, 'nl-NL');
@NgModule({
...
providers: [{provide: LOCALE_ID, useValue: 'nl-NL'}],
...
})
Very nice this library uses the builtin way of setting the locale 👍
from angular-google-charts.
Hello, @FERNman, I'm trying to use the 'pt' locale and no matter what I do, it doesn't seem to work. The rest of my system fully understand the locale_id, besides this component. Is there any particular thing I should do?
from angular-google-charts.
Hey @guibleme,
Probably the underlying GoogleCharts library doesn't know this locale. However, I'm currently not able to check this. If this is the problem, I really don't know if there's anything we can do about it.
from angular-google-charts.
Hi @guibleme ,
I was able to use the 'pt' locale only with GoogleChartsModule.forRoot().
Just importing the module didn't work for me.
import {LOCALE_ID, NgModule} from '@angular/core';
import { registerLocaleData } from '@angular/common';
import localePt from '@angular/common/locales/pt';
registerLocaleData(localePt, 'pt');
@NgModule({
imports: [
GoogleChartsModule.forRoot()
],
providers: [
{provide: LOCALE_ID, useValue: 'pt'}
]
})
from angular-google-charts.
Hello,
I'm having an issue with setting the locale to Swedish ('sv').
This is my code:
import {LOCALE_ID, NgModule} from '@angular/core';
import { registerLocaleData } from '@angular/common';
import localeSv from '@angular/common/locales/sv';
registerLocaleData(localeSv, 'sv');
@NgModule({
imports: [
GoogleChartsModule.forRoot()
],
providers: [
{provide: LOCALE_ID, useValue: 'sv'}
]
})
I get an error requesting the resource from gstatic.com:
https://www.gstatic.com/charts/46.2/i18n/jsapi_compiled_i18n_Gantt_module__sv.js net::ERR_ABORTED 404
Is this due to issues with the underlying Google charts or is there something I can do to solve this?
from angular-google-charts.
Related Issues (20)
- Push latest version to npmjs.com HOT 2
- how to clear table in the latest api? HOT 1
- New version 2.2.3 is not compatible with the current stable version of Angular (v13.2.0) HOT 8
- Angular v8. Compilation fails when importing the module. Error states: 'Please add a @NgModule annotation'
- Unable to install angular-google-charts in project
- Angular google chart Version 2.2.2 Is not working on my existing Angular 9 Application HOT 1
- Use Types interfaces in project
- GoogleChartPackagesHelper.getPackageForChartName for angular 14
- The target entry-point "angular-google-charts" has missing dependencies: - @angular/core
- Update peerDependencies for Angular 15 HOT 4
- Locale Support HOT 1
- Expand Row interface definition HOT 1
- I don't get any error but I don't see anything
- Calendar Heatmap Type Not Work dynamicResize
- Angular 16 support HOT 8
- Customize tooltip
- broaden type Row in chart-base.component.ts HOT 1
- Memory leak
- This library is unmaintained HOT 2
- Angular 18 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-google-charts.