[ 2 posts ]

Martin Townsend

  • Username: mtownsend1973
  • Joined: Thu Jun 14, 2012 2:15 am
  • Posts: 2
  • Offline
  • Profile

YUI3 Timebase chart - adding event markers.

Post Posted: Thu Jun 14, 2012 2:33 am
+0-
Hi,

I have a time based chart with 6-7 series with each series containing around 700 points. showMarkers is set to false so that the chart renders fairly quickly.

Within the data there are events logged and I was wondering if there is a way of showing these events (There aren't many, usually around 10 events) on my chart. I thought about creating a series with markers with custom tooltips for these events but there doesn't seem to be a way of having one series with markers and the rest without.

I've currently created a separate chart below the main chart with a series that shows the events. But the x axis doesn't line up as the first and last events never have the same time as the first and last points of the main chart.

Any help appreciated,

Martin.

Tripp Bridges

YUI Developer

  • Username: tripp
  • Joined: Wed Jan 07, 2009 1:54 pm
  • Posts: 440
  • GitHub: tripp
  • Gists: tripp
  • YUI Developer
  • Offline
  • Profile

Re: YUI3 Timebase chart - adding event markers.

Post Posted: Tue Jun 19, 2012 8:14 pm
+0-
You can control the showMarkers attribute at the series level (for combo series) as well. Add a seriesCollection attribute to you chart.

Code:
var mychart = new Y.Chart({
    dataProvider:myDataValues,
    render:"#mychart",
    seriesCollection: [
        {
            yKey: "miscellaneous",
            showMarkers: false
        },
        {
            yKey: "expenses",
            showMarkers: true
        },
        {
            yKey: "revenue",
            showMarkers: false
        }
    ]
});


Thanks,
Tripp
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum