jQWidgets Forums

jQuery UI Widgets Forums Chart Linear chart

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Linear chart Posts
  • Linear chart #53763

    Mhanna AbuTareef
    Participant

    Hi,

    I need to populate a big data to a line chart where the x-axis is of numbers/strings.
    I know it’s possible for x-Axis of type date, but this isn’t what i need.

    Currently the x-axis labels overlapped because the chart hasn’t categorize the x-axis and just labeled the x-Axis for each y-Axis value!!

    Is it possible?

    Let’s say i built the json like this:

    function doGeneration() {
    	        var num= 50000, data = [], curr = 10;
    
    	        for (var i = 0; i < num; i++) {
    	            if (Math.random() > .5) {
    	                curr += Math.random() * 2.0;
    	            } else {
    	                curr -= Math.random() * 2.0;
    	            }
    	            var val1 = Math.round(curr * 1000.0) / 1000.0;
    	            data[i] = { X: i.toString(), Y: val1 };
    	        }
    	        currData = data;
    	    }
    Linear chart #53811

    Peter Stoev
    Keymaster

    Hi Mhanna AbuTareef,

    If you wish, you can customize the rendering of your Chart Labels in the way you wish via a custom rendering function. Ex: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/javascript_chart_line_series.htm?arctic

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.