Comments (15)
Hey !
Thanks for using the library and reporting this.
@koppert, could you try to install nwb.
npm install -g nwb
and then build with it:
nwb build
I'm very happy to accept a PR for this. And will try to do it in the weekend if no PR is submitted.
So @Nevraeka you should be covered for your upcoming release.
Thanks @koppert for digging in the code, if you still get build errors submit a PR with some example code that you'd like to work and I'll try it on my machine.
Cheers !
from react-google-charts.
@rakannimer It works. Just do not compiled the demo, but no problem. Thanks.
@Nevraeka Correct. That's right. All options available in NumberFormat.
I have not had time to test. But the changes are these:
https://github.com/koppert/react-google-charts/commit/5c15e7c522a2c9ff91608ac7d1b4eacf701ebf7c
from react-google-charts.
I am running into the same issues
from react-google-charts.
@rakannimer I tried to wrap this with a formatter with no luck. I am happy to pair on this or submit a PR since I need this for a project releasing soon. What code would need to be adjusted to make this happen?
from react-google-charts.
I think we could transfer NumberFormat config ({prefix: '$', negativeColor: 'red', negativeParens: true}) via props and execute formatter.format on buildDataTableFromProps.
I will try.
from react-google-charts.
I made the change, but I can not compile.
$ npm run build
> [email protected] build C:\Users\bruno.barros\Desktop\Apps\react-google-charts
> nwb build
nwb: clean-module
nwb: build-module (es5)
ReferenceError: [BABEL] C:\Users\bruno.barros\Desktop\Apps\react-google-charts\src\components\Chart.js: Unknown option: C:\Users\bruno.barros\Desktop\Apps\react-google-charts\.babelrc.presets
from react-google-charts.
Many Thanks @rakannimer & @koppert . This should cover percentage decimal formatting as well, correct?
from react-google-charts.
Thanks @koppert I integrated your code change. Can one of you guys try out the master branch and let me know if it works for your use case ?
Cheers !
from react-google-charts.
@rakannimer @koppert wouldn't this change only allow for 1 column to be formatted?
from react-google-charts.
I would like to apologize for my absence.
NumberFormat would not solve my problem. I wanted to format vaxis in a column chart. Only then I realized that it should be used in table chart.
@claudiowilson You're right. I will modify the code to pass an array in the props.
from react-google-charts.
Hi guys ! Did you make the PR? because in the code this feature is missing
from react-google-charts.
As far as I can see, it is still not possible to format more than one column at once. Any chance this will attract any attention?
from react-google-charts.
There seems to be an issue. When trying to use formatters I get this error:
TypeError: _this4.applyNumberFormat is not a function
Seems the issue is somewhere here:
this.props.formatters.forEach(({ type, column, options }) => {
switch (type) {
case 'NumberFormat':
this.applyNumberFormat(column, options);
case 'DateFormat':
this.applyDateFormat(column, options);
default:
console.log('Unkown formatter type: ' + type);
break;
}
});
from react-google-charts.
Hello aikonplus ,I have the same error.
I solved by mooving the 2 scoped functions applyNumberFormat and applyDateFormat into class Chart method (for matching 'this' in the context of the call).
I have also add some break;
into the swith case and now it s seem to work correctly.
Cordially.
from react-google-charts.
@Michto8 Could you please make a pull request for that?
from react-google-charts.
Related Issues (20)
- Add support for Marker GeoCharts and ISO-3166:2 district codes
- Options are not documented
- Allow to close tooltips programmatically
- Storage size formats
- [Bug]: addOneTimeListener this doesn't seem to be supported?
- [Bug]: Can't seem to get MutationObserver to work inside an event, but it works with the underlying library
- [Bug]: Bar Chart (and Other?) Examples Broken
- [Bug]: No Material UI Support?
- [Bug]: Scatter chart options not recognized (Material)
- Remove deprecated dependency react-scripts
- [Bug]: Diff tooltips prefix option
- [Bug]: Stacked Column Chart - Show Annotation on Bars HOT 1
- [Bug]: ReferenceError: Property 'document' doesn't exist
- [Bug]: sort and page events are not working with Table chart HOT 1
- [Bug]: Geo chart (maybe other) doesn't respect React@18 StrictMode
- [Bug]: Select event is not working in strict mode. HOT 1
- [Bug]: loadingStatus state for react-google-charts is set as loading permanantly HOT 5
- [Bug]: Org Chart does not render label on top node HOT 1
- [Bug]: Charts with spreadsheets does not work
- [Bug]: can't only show lable in tooltip
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 react-google-charts.