Creating intentional gaps in line charts

4 views
Skip to first unread message

Dan Clarizio

unread,
Nov 3, 2009, 4:18:07 PM11/3/09
to ZiYa Plugin
Fernand,
I have a requirement to leave gaps in some line charts (users
don't want to include Saturday and Sunday data in the charts). I
still want the charts to include the missing days along the x axis,
but just not have data points above them. XML/SWF charts version 5.06
supports a connect=true/false option in chart_pref defined as
"connect: A boolean that indicates whether missing data (null values)
produce gaps in the line chart, or the line stays connected. Valid
values are true or false. The default is false (missing data produce
gaps)."
So, where I needed a gap, I put {:value = nil} in the series array
(I've also tried some other things, like :value = "" and " " and even
putting a nil directly into the series array). No matter what, I
can't get the XML produced that properly creates the gap in the line
chart.
I used the sample.html and pasted my XML stream into the
sample.xml file in the XML/SWF folder. Normally, with all values in
the series present, the row looks like this:
<row>
<string>Avg I/O</string>
<number>57.2766666666667</number>
<number>69.9796720279704</number>
<number>770.001356060605</number>
</row>

I get the proper gap if I replace one of the number elements with a
null element, like this:
<row>
<string>Avg I/O</string>
<number>57.2766666666667</number>
<null/>
<number>770.001356060605</number>
</row>

Playing around, it seems I can put any kind of non-value type element
(even <dan/> works) and it creates the gap properly. Can you tell me
what to put into my series array to make ZIya produce an element that
will cause the XML/SWF line chart to leave a gap for that column?
Thank you, Dan

Fernand Galiana

unread,
Nov 4, 2009, 9:38:34 AM11/4/09
to ziya-...@googlegroups.com
Hi Dan,

  Great find ! Yes this is a bug in ZiYa. I have a fix in place but I am currently unable to push
  out the new gem due to the whole github/gemcutter transition.

  I'll keep you posted on the progress...

Thanks !
Fernand

Fernand Galiana

unread,
Nov 4, 2009, 10:08:19 AM11/4/09
to ziya-...@googlegroups.com
Hi Dan,
 
  Ziya 2.1.6 is now out on gem cutter. You will need to update your ruby gem sources and add gem cutter as a source or follow the instructions here http://gemcutter.org.

  Let me know if that worked for you...

Thanks !!
Fernand

Dan Clarizio

unread,
Nov 18, 2009, 5:23:59 PM11/18/09
to ZiYa Plugin
Fernand,
Sorry I didn't get back to you, but somehow my Ziya group emails
got shut off and I didn't even know you replied. :( Anyway, I'm
still on 2.0.7 of Ziya and I know some of the interfaces changed and I
have to change some of my code, so I might not get to test our your
fix too soon. Right now, I'm post processing the XML with a gsub! to
put in the <null/> strings . . . hacky, but it works.
Hopefully, I can get to your latest version soon.
Thanks, Dan

On Nov 4, 7:08 am, Fernand Galiana <fernand.gali...@gmail.com> wrote:
> Hi Dan,
>
>   Ziya 2.1.6 is now out on gem cutter. You will need to update your ruby gem
> sources and add gem cutter as a source or follow the instructions herehttp://gemcutter.org.
>
>   Let me know if that worked for you...
>
> Thanks !!
> Fernand
>
> On Wed, Nov 4, 2009 at 7:38 AM, Fernand Galiana
> <fernand.gali...@gmail.com>wrote:
>
> > Hi Dan,
>
> >   Great find ! Yes this is a bug in ZiYa. I have a fix in place but I am
> > currently unable to push
> >   out the new gem due to the whole github/gemcutter transition.
>
> >   I'll keep you posted on the progress...
>
> > Thanks !
> > Fernand
>

Dan Clarizio

unread,
Nov 19, 2009, 9:13:36 PM11/19/09
to ZiYa Plugin
Fernand,
Well, the XML/SWF charts version 5.0.6 that I was using had
support for the line chart gaps, but it has a bug. So, I upgraded to
their 5.0.8 version by upgrading Ziya to the latest level. Had some
issues with logging conflicts (we have our own log class) but once
that was taken care of, I got everything working. Final result, nil
values are handled properly by ZIya and displayed as gaps in the
charts!
Thank again, Dan

Fernand Galiana

unread,
Nov 19, 2009, 9:19:38 PM11/19/09
to ziya-...@googlegroups.com
Hi Dan,

   Cool ! - Thanks for reporting back - glad to hear about happy users ;-)

-Fernand
Reply all
Reply to author
Forward
0 new messages