Issue creating a Bar chart

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue creating a Bar chart

Harry Devine
I'm trying to create a bar chart using Dojo and, while it does show up, only the first element is displaying, even though I should have 5 bars.  I'm using the StoreSeries for my data, and I get only 1 element displaying.  I re-wrote the code to use a static Memory store and its doing the same thing.  I created a JSFiddle to illustrate the issue here:  https://jsfiddle.net/hdevine/j6mu1unf/.

Any ideas would be greatly appreciated!

Thanks,
Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Issue creating a Bar chart

dylanks
You were only adding one item to the series, so there was only one item
to plot...

https://jsfiddle.net/dylan/mhmfxzxb/

on 3/1/16, 13:20 (GMT-07:00) Harry Devine said the following:

> I'm trying to create a bar chart using Dojo and, while it does show up,
> only the first element is displaying, even though I should have 5 bars.
>  I'm using the StoreSeries for my data, and I get only 1 element
> displaying.  I re-wrote the code to use a static Memory store and its
> doing the same thing.  I created a JSFiddle to illustrate the issue
> here:  https://jsfiddle.net/hdevine/j6mu1unf/.
>
> Any ideas would be greatly appreciated!
>
> Thanks,
> Harry
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|

Re: Issue creating a Bar chart

Harry Devine
I see your example works but I can't see why mine doesn't. Can you elaborate?  Just trying to see the error in my ways for future reference.

Thanks
Harry

Sent from my iPad

> On Mar 1, 2016, at 4:13 PM, Dylan Schiemann <[hidden email]> wrote:
>
> You were only adding one item to the series, so there was only one item
> to plot...
>
> https://jsfiddle.net/dylan/mhmfxzxb/
>
> on 3/1/16, 13:20 (GMT-07:00) Harry Devine said the following:
>> I'm trying to create a bar chart using Dojo and, while it does show up,
>> only the first element is displaying, even though I should have 5 bars.
>> I'm using the StoreSeries for my data, and I get only 1 element
>> displaying.  I re-wrote the code to use a static Memory store and its
>> doing the same thing.  I created a JSFiddle to illustrate the issue
>> here:  https://jsfiddle.net/hdevine/j6mu1unf/.
>>
>> Any ideas would be greatly appreciated!
>>
>> Thanks,
>> Harry
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Issue creating a Bar chart

Harry Devine
OK, I think I see what you did and why it worked, but this raises another set of related questions: instead of the numbers (1, 2, etc.) on the X axis, how can I put the failuretype (as per my data set) as those labels?  And how do they show up in the legend?  And how can each bar be a different color?

Thanks,
Harry


From: "Harry Devine" <[hidden email]>
To: [hidden email]
Sent: Wednesday, March 2, 2016 1:45:13 PM
Subject: Re: [Dojo-interest] Issue creating a Bar chart

I see your example works but I can't see why mine doesn't. Can you elaborate?  Just trying to see the error in my ways for future reference.

Thanks
Harry

Sent from my iPad

> On Mar 1, 2016, at 4:13 PM, Dylan Schiemann <[hidden email]> wrote:

>
> You were only adding one item to the series, so there was only one item
> to plot...
>
> https://jsfiddle.net/dylan/mhmfxzxb/
>
> on 3/1/16, 13:20 (GMT-07:00) Harry Devine said the following:
>> I'm trying to create a bar chart using Dojo and, while it does show up,
>> only the first element is displaying, even though I should have 5 bars.
>> I'm using the StoreSeries for my data, and I get only 1 element
>> displaying.  I re-wrote the code to use a static Memory store and its
>> doing the same thing.  I created a JSFiddle to illustrate the issue
>> here:  https://jsfiddle.net/hdevine/j6mu1unf/.
>>
>> Any ideas would be greatly appreciated!
>>
>> Thanks,
>> Harry
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Issue creating a Bar chart

dylanks
Implement a custom labelFunc for the chart...

on 3/3/16, 07:40 (GMT-07:00) Harry Devine said the following:

> OK, I think I see what you did and why it worked, but this raises
> another set of related questions: instead of the numbers (1, 2, etc.) on
> the X axis, how can I put the failuretype (as per my data set) as those
> labels?  And how do they show up in the legend?  And how can each bar be
> a different color?
>
> Thanks,
> Harry
>
> ------------------------------------------------------------------------
> *From: *"Harry Devine" <[hidden email]>
> *To: *[hidden email]
> *Sent: *Wednesday, March 2, 2016 1:45:13 PM
> *Subject: *Re: [Dojo-interest] Issue creating a Bar chart
>
> I see your example works but I can't see why mine doesn't. Can you
> elaborate?  Just trying to see the error in my ways for future reference.
>
> Thanks
> Harry
>
> Sent from my iPad
>
>> On Mar 1, 2016, at 4:13 PM, Dylan Schiemann <[hidden email]> wrote:
>>
>> You were only adding one item to the series, so there was only one item
>> to plot...
>>
>> https://jsfiddle.net/dylan/mhmfxzxb/
>>
>> on 3/1/16, 13:20 (GMT-07:00) Harry Devine said the following:
>>> I'm trying to create a bar chart using Dojo and, while it does show up,
>>> only the first element is displaying, even though I should have 5 bars.
>>> I'm using the StoreSeries for my data, and I get only 1 element
>>> displaying.  I re-wrote the code to use a static Memory store and its
>>> doing the same thing.  I created a JSFiddle to illustrate the issue
>>> here:  https://jsfiddle.net/hdevine/j6mu1unf/.
>>>
>>> Any ideas would be greatly appreciated!
>>>
>>> Thanks,
>>> Harry
>> --
>> Dojo Toolkit: http://dojotoolkit.org/
>> Tutorials: http://dojotoolkit.org/documentation/
>>
>> [hidden email]
>> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|

Re: Issue creating a Bar chart

Harry Devine
Is there an example of that somewhere?

Harry


From: "Dylan Schiemann" <[hidden email]>
To: [hidden email]
Sent: Thursday, March 3, 2016 9:44:31 AM
Subject: Re: [Dojo-interest] Issue creating a Bar chart

Implement a custom labelFunc for the chart...

on 3/3/16, 07:40 (GMT-07:00) Harry Devine said the following:

> OK, I think I see what you did and why it worked, but this raises
> another set of related questions: instead of the numbers (1, 2, etc.) on
> the X axis, how can I put the failuretype (as per my data set) as those
> labels?  And how do they show up in the legend?  And how can each bar be
> a different color?
>
> Thanks,
> Harry
>
> ------------------------------------------------------------------------
> *From: *"Harry Devine" <[hidden email]>
> *To: *[hidden email]
> *Sent: *Wednesday, March 2, 2016 1:45:13 PM
> *Subject: *Re: [Dojo-interest] Issue creating a Bar chart
>
> I see your example works but I can't see why mine doesn't. Can you
> elaborate?  Just trying to see the error in my ways for future reference.
>
> Thanks
> Harry
>
> Sent from my iPad
>
>> On Mar 1, 2016, at 4:13 PM, Dylan Schiemann <[hidden email]> wrote:
>>
>> You were only adding one item to the series, so there was only one item
>> to plot...
>>
>> https://jsfiddle.net/dylan/mhmfxzxb/
>>
>> on 3/1/16, 13:20 (GMT-07:00) Harry Devine said the following:
>>> I'm trying to create a bar chart using Dojo and, while it does show up,
>>> only the first element is displaying, even though I should have 5 bars.
>>> I'm using the StoreSeries for my data, and I get only 1 element
>>> displaying.  I re-wrote the code to use a static Memory store and its
>>> doing the same thing.  I created a JSFiddle to illustrate the issue
>>> here:  https://jsfiddle.net/hdevine/j6mu1unf/.
>>>
>>> Any ideas would be greatly appreciated!
>>>
>>> Thanks,
>>> Harry
>> --
>> Dojo Toolkit: http://dojotoolkit.org/
>> Tutorials: http://dojotoolkit.org/documentation/
>>
>> [hidden email]
>> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Issue creating a Bar chart

dylanks
I've updated https://jsfiddle.net/dylan/mhmfxzxb/2/ to include a labelFunc.

on 3/3/16, 07:49 (GMT-07:00) Harry Devine said the following:

> Is there an example of that somewhere?
>
> Harry
>
> ------------------------------------------------------------------------
> *From: *"Dylan Schiemann" <[hidden email]>
> *To: *[hidden email]
> *Sent: *Thursday, March 3, 2016 9:44:31 AM
> *Subject: *Re: [Dojo-interest] Issue creating a Bar chart
>
> Implement a custom labelFunc for the chart...
>
> on 3/3/16, 07:40 (GMT-07:00) Harry Devine said the following:
>> OK, I think I see what you did and why it worked, but this raises
>> another set of related questions: instead of the numbers (1, 2, etc.) on
>> the X axis, how can I put the failuretype (as per my data set) as those
>> labels?  And how do they show up in the legend?  And how can each bar be
>> a different color?
>>
>> Thanks,
>> Harry
>>
>> ------------------------------------------------------------------------
>> *From: *"Harry Devine" <[hidden email]>
>> *To: *[hidden email]
>> *Sent: *Wednesday, March 2, 2016 1:45:13 PM
>> *Subject: *Re: [Dojo-interest] Issue creating a Bar chart
>>
>> I see your example works but I can't see why mine doesn't. Can you
>> elaborate?  Just trying to see the error in my ways for future reference.
>>
>> Thanks
>> Harry
>>
>> Sent from my iPad
>>
>>> On Mar 1, 2016, at 4:13 PM, Dylan Schiemann <[hidden email]>
> wrote:
>>>
>>> You were only adding one item to the series, so there was only one item
>>> to plot...
>>>
>>> https://jsfiddle.net/dylan/mhmfxzxb/
>>>
>>> on 3/1/16, 13:20 (GMT-07:00) Harry Devine said the following:
>>>> I'm trying to create a bar chart using Dojo and, while it does show up,
>>>> only the first element is displaying, even though I should have 5 bars.
>>>> I'm using the StoreSeries for my data, and I get only 1 element
>>>> displaying.  I re-wrote the code to use a static Memory store and its
>>>> doing the same thing.  I created a JSFiddle to illustrate the issue
>>>> here:  https://jsfiddle.net/hdevine/j6mu1unf/.
>>>>
>>>> Any ideas would be greatly appreciated!
>>>>
>>>> Thanks,
>>>> Harry
>>> --
>>> Dojo Toolkit: http://dojotoolkit.org/
>>> Tutorials: http://dojotoolkit.org/documentation/
>>>
>>> [hidden email]
>>> To unsubscribe, visit:
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>> --
>> Dojo Toolkit: http://dojotoolkit.org/
>> Tutorials: http://dojotoolkit.org/documentation/
>>
>> [hidden email]
>> To unsubscribe, visit:
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|

Re: Issue creating a Bar chart

Harry Devine
How do I do that same labelFunc with a data store?  I am using Ken Franquiero's RequestMemory.js to get my data into a  Dojo store, and I'm assigning that store to the chart via the .addSeries function.  How to I interrogate the Dojo store for the label data?

Thanks,
Harry


From: "Dylan Schiemann" <[hidden email]>
To: [hidden email]
Sent: Thursday, March 3, 2016 10:38:00 AM
Subject: Re: [Dojo-interest] Issue creating a Bar chart

I've updated https://jsfiddle.net/dylan/mhmfxzxb/2/ to include a labelFunc.

on 3/3/16, 07:49 (GMT-07:00) Harry Devine said the following:

> Is there an example of that somewhere?
>
> Harry
>
> ------------------------------------------------------------------------
> *From: *"Dylan Schiemann" <[hidden email]>
> *To: *[hidden email]
> *Sent: *Thursday, March 3, 2016 9:44:31 AM
> *Subject: *Re: [Dojo-interest] Issue creating a Bar chart
>
> Implement a custom labelFunc for the chart...
>
> on 3/3/16, 07:40 (GMT-07:00) Harry Devine said the following:
>> OK, I think I see what you did and why it worked, but this raises
>> another set of related questions: instead of the numbers (1, 2, etc.) on
>> the X axis, how can I put the failuretype (as per my data set) as those
>> labels?  And how do they show up in the legend?  And how can each bar be
>> a different color?
>>
>> Thanks,
>> Harry
>>
>> ------------------------------------------------------------------------
>> *From: *"Harry Devine" <[hidden email]>
>> *To: *[hidden email]
>> *Sent: *Wednesday, March 2, 2016 1:45:13 PM
>> *Subject: *Re: [Dojo-interest] Issue creating a Bar chart
>>
>> I see your example works but I can't see why mine doesn't. Can you
>> elaborate?  Just trying to see the error in my ways for future reference.
>>
>> Thanks
>> Harry
>>
>> Sent from my iPad
>>
>>> On Mar 1, 2016, at 4:13 PM, Dylan Schiemann <[hidden email]>
> wrote:
>>>
>>> You were only adding one item to the series, so there was only one item
>>> to plot...
>>>
>>> https://jsfiddle.net/dylan/mhmfxzxb/
>>>
>>> on 3/1/16, 13:20 (GMT-07:00) Harry Devine said the following:
>>>> I'm trying to create a bar chart using Dojo and, while it does show up,
>>>> only the first element is displaying, even though I should have 5 bars.
>>>> I'm using the StoreSeries for my data, and I get only 1 element
>>>> displaying.  I re-wrote the code to use a static Memory store and its
>>>> doing the same thing.  I created a JSFiddle to illustrate the issue
>>>> here:  https://jsfiddle.net/hdevine/j6mu1unf/.
>>>>
>>>> Any ideas would be greatly appreciated!
>>>>
>>>> Thanks,
>>>> Harry
>>> --
>>> Dojo Toolkit: http://dojotoolkit.org/
>>> Tutorials: http://dojotoolkit.org/documentation/
>>>
>>> [hidden email]
>>> To unsubscribe, visit:
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>> --
>> Dojo Toolkit: http://dojotoolkit.org/
>> Tutorials: http://dojotoolkit.org/documentation/
>>
>> [hidden email]
>> To unsubscribe, visit:
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
>
> [hidden email]
> To unsubscribe, visit:
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest