i want to display the values on the y-axis with $ but i couldn't figure out how it is done. is it even possible? if yes please how can i do it? is it also possible to make use a gradient in bars ?
Define a format string in chxs. Use cUSD to format as US dollars.
Here's an example from the docs:
https://chart.googleapis.com/chart
?cht=s
&chd=s:984sttvuvkQIBLKNCAIi,DEJPgq0uov17zwopQODS,AFLPTXaflptx159gsDrn
&chxt=x,y,r
&chxr=0,0,1000000,250000|1,0,60|2,0,5000
&chxs=0N*e*,000000|1N*cUSD*Mil,FF0000|2N*sz2*,0000FF
&chs=250x125
The relevant portion being chxs=...1N*cUSD*Mil,FF0000.
Related
I have some data from workplaces with some different work areas, I need to extract a list for each workplace with their corresponding availables working areas, I have an example of some kind of attempt really close what I wanted. I use this formula but with more data will be long time to do it =IF(D2=$G$1, "Yes", "No"). I want to do it more automatic with some formulas but I don't know where to start.
Give a try on below formula. Put the formula to G1 cell then drag down as needed.
=TRANSPOSE(IFERROR(FILTER($D$2:$D$16,$A$2:$A$16=F2,$D$2:$D$16<>""),""))
I'm new to chartjs and couldn't find any example on this...
Is there a way to stack these charts vertically (same x-axis) with one long y-axis instead of 3 scales/y-axes ?
From this:
To something like this : (just an example)
here an example:
https://jsfiddle.net/Developer2011/ogjewLuz/34/
Thanks
Soo I did some research about it and there is a lot of people with this problem.
The solution that I'm giving to you will have some problems interacting with the final user but if it's just for display maybe this is what you want.
Right here is the example where you can ofcourse add your own format and specifications:
https://jsfiddle.net/4th6rbcw/3/
Is there a way to let Chart.js to round up decimals?
Sure, i can do it in PHP where i get the numbers.
But maby there is an option in Chart.js to do this?
I have tried nothing, but google search.
What i want is: 2733.33
ChartJS expects the data to be in the format you need when it is fed in; as you mention you'll need to do it in PHP prior to putting it into the data array.
I'm building a deal aggregator so I need a crawler that will extract data from some sites: price, discount, image, coordinates and name of deal of cource.
Do you know of any tutorials, ebooks or something that will help me? For image and coordinates and discount I have a solution and pattern:
image: biggest image is always the main image of deal
discount: discount is always a number between 50 and 99 and always has a "%" symbol
coordinates: is always in decimal numbers so I get it with regex
How do I get the following items?
Name of deal?
Price?
Do you know of any data extraction algorithms that can be helpful?
I'd suggest you to use XPath based scraper. For example Web-Harvest
Or, if you want to analyze raw texts, I'd suggest using state-machine parser for recognizing templated parts of texts.
Look at this topic: Are there APIs for text analysis/mining in Java?
what is wrong with ratio? (100,200)
https://chart.googleapis.com/chart?cht=p&chd=t:100,200&chs=300x120&chl=Hello|World
As marcog explained, by default values over 100 will be truncated to 100, thus causing your api call to be processed in the background as:
https://chart.googleapis.com/chart?cht=p&chd=t:100,100&chs=300x120&chl=Hello|World
which is why you see a pie chart with two equal pieces. One way to fix this is to add a custom scale to your data series using the chds parameter like this:
https://chart.googleapis.com/chart?cht=p&chd=t:100,200&chds=0,200&chs=300x120&chl=Hello|World
Note I added a &chds=0,200 to specify that values can range from 0 to 200.
Another option is to use percentages rather than actual values
Hope this helps.
The values need to be between 0 and 100, with values above 100 truncated to 100 (reference).
Had a quick mess around with the URL. Is it possible there's meant to be a "total" parameter in the URL? Since 3 parameters just splits it equally into 3 parts...