Jump to content
JChartFX Community
  • 0

configuring point attributes in jquery



I am using jquery in setting up my jchartfx chart. I have an intention of configuring the display properties (shape, color, etc.) of a specific point in a multiple series chart. The examples I found so far are for pure JS implementation,. Can you show me how to do that in jquery? e.g. how do you declare an instance of a pointAttribute class in jquery?

I appreciate any tips.



Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You can configure per-point attributes using our jQuery UI as follows

var points = $("div", ".demo2").chart("getPoints");

var pointAttr = new cfx.PointAttributes();

// Use this if you are NOT using jChartFX CSS

// pointAttr.setColor("#00FF40");

// Use this if you are using jChartFX CSS and make sure there is an entry

// in your CSS for this tag

// pointAttr.setTag("SpecialPoint");

points.setItem(0, 4, pointAttr);


Please note that whenever you want to access one of our complex properties, e.g. a property that represents a collection such as Points you get the collection as a method and then use a very similar code that you would use against a pure JS implementation.


Share this post

Link to post
Share on other sites
  • 0

 Thanks. worked well. I would have thought though that there was a way to do that within the chart declaration? like:

 $("div", ".demo2").chart({

                animations: {
                    load: {
                        enabled: true
                gallery: cfx.Gallery.Lines,
                data: {
                    series: 3
                axisY: {
                    min: 0,
                    max: 10,
                }, ........

                point attribute manipulation code somewhere here...





Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now