[ 4 posts ]

Serge Karalli

  • Username: skarred
  • Joined: Mon Oct 31, 2011 5:17 am
  • Posts: 4
  • GitHub: skarred
  • Gists: skarred
  • IRC: skarred
  • Offline
  • Profile

Marker shapes on YUI 3 charts

Post Posted: Mon Dec 19, 2011 6:35 pm
+0-
Hello,

Is there a way to change the shape of the round marker to a diamond, rectangle or other?
I am particularly interested in assigning a uniques shape for each series....

I have searched through the APIs and this forum. If I missed it, please forgive me for the duplicate question.

Thanks in advance,

Serge Karalli

Tripp Bridges

YUI Developer

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

Re: Marker shapes on YUI 3 charts

Post Posted: Tue Dec 20, 2011 9:32 am
+0-
Hi Serge,
You can specify different shapes for the marker but, currently, you have only 2 choices. ("circle" and "rect")

The below code will set rectangular markers for the miscellaneous series.

Code:
    var myDataValues = [
        {category:"5/1/2010", miscellaneous:2000, expenses:3700, revenue:2200},
        {category:"5/2/2010", miscellaneous:50, expenses:9100, revenue:100},
        {category:"5/3/2010", miscellaneous:400, expenses:1100, revenue:1500},
        {category:"5/4/2010", miscellaneous:200, expenses:1900, revenue:2800},
        {category:"5/5/2010", miscellaneous:5000, expenses:5000, revenue:2650}
    ];
     
    var mychart = new Y.Chart({
        dataProvider:myDataValues,
        render:"#mychart",
        seriesCollection: [
            {
                key: "miscellaneous",
                styles: {
                    marker: {
                        shape: "rect"
                    }
                }
            }
        ]
    });


Please feel free to file a ticket for more/custom shapes.

Thanks,
Tripp

Serge Karalli

  • Username: skarred
  • Joined: Mon Oct 31, 2011 5:17 am
  • Posts: 4
  • GitHub: skarred
  • Gists: skarred
  • IRC: skarred
  • Offline
  • Profile
Tags:

Re: Marker shapes on YUI 3 charts

Post Posted: Wed Dec 21, 2011 8:30 pm
+0-
Thanks Trip,

With a transform: rotate(45), I was also able to get a diamond. Ellipse also worked.

Serge

Mark Marziale

  • Username: markmarz
  • Joined: Tue Feb 21, 2012 7:23 am
  • Posts: 7
  • Offline
  • Profile
Tags:

Re: Marker shapes on YUI 3 charts

Post Posted: Tue Feb 21, 2012 7:27 am
+0-
Please explain how you coded the rotation and got ellipse to work.

Thanks,
Mark
  [ 4 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