Trying to create a stacked Bar chart using CSV input


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by am on 2nd December 2016
Does anyone have an example of a stacked bar chart,using a CSV file as input.

I can see how the stacked graph works when two the source data is similar to
data: [[1,2,3], [4,5,6]]
but when i try this using a CSV, i have tried
data : [[ dataset1 ], [ dataset2 ]]

i cant get this to work.

any help please

thanks
Posted by Richard on 2nd December 2016
Hi there,

Something like this perhaps:

www.rgraph.net/fiddle/view.html/a-stacked-bar-chart-using-the-csv-readerr




Richard
Posted by am on 5th December 2016
Thank you! thats just what i want.

However, where have you defined this in the documentation? For example, after looking at the above example, I have tried searching for the word 'slice' in most of the documentation, but still find no reference to it.

Im not sure about the others, but I find this is a very capable piece of software, but the documentation layout **really** lets it down.

Where is the slice functionality defined? I tried looking in the CSV-file-reader, misc information & API documentation, and its in none of those areas.
Can you indicate where this is located? why is there no search for documentation?
Is there a better layout of the documentation, preferably all of the documentation in a hierarchical manner?

Thank you.

Posted by Richard on 5th December 2016
Hi,

> However, where have you defined this in the documentation? For example, after looking
> at
> the above example, I have tried searching for the word 'slice' in most of the
> documentation, but still find no reference to it.

.slice() is a standard JavaScript method that is available to all arrays. For example:

var myArray = [1,2,3,4,5,6].slice(0, 3); // [1,2,3]

> Im not sure about the others, but I find this is a very capable piece of software, but the > documentation layout **really** lets it down.

That's the first time I've heard that. Everybody else has commended the docs.

> Where is the slice functionality defined? I tried looking in the CSV-file-reader, misc
> information & API documentation, and its in none of those areas.
> Can you indicate where this is located?

You could use the Mozilla docs:

developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice

> why is there no search for documentation?

Use Google and start the query with the word "rgraph". Eg:

www.google.com/#q=rgraph+docs+fuel

> Is there a better layout of the documentation, preferably all of the documentation in > a hierarchical manner?

It already is in a hiearchical layout starting here:

www.rgraph.net/docs/index.html




Richard
Posted by am on 5th December 2016
Hi Richard

Thanks for getting back to me so quickly.

I am not a javascript programmer, so was not aware that some of the methods were specifically Javascript - so thank you for clarifying that. Looks like i need to do alot more reading before I can get the most out of Rgraph

The Mozilla documentation is really good , I can see what other methods are available to me now. Thanks for pointing that out.

Regarding the readability of the documentation, Its probably personal preference, but i find your layout for your documentation is quite spread out making it difficult see what you need (www.rgraph.net/docs/bar.html#background) whereas most other documentation for coding present in a tabular manner - which is easier to spot the methods etc you need. For example see developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Text_formatting#String_objects "methods of string" or www.cplusplus.com/reference/array/array/ "Member functions"

However, the available chart types and options is more closer to what I wanted. I think I clicked on all the other links except that one.

thanks





Add a reply

 




« Back to message list
RGraph on social media