jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • mishovic
    Member

    Hi Peter yes thx I am now using that chart BUT I need y-axis values from 1000-7000 in 1000 increments and need to ditch the Index Value altogether…can’t figure how to do that…have figured the x axis values ok…could you help…here is my amended code:

    $(document).ready(function () {
    // prepare the data
    var source =
    {
    datatype: “tab”,
    datafields: [
    { name: ‘Year’ },
    { name: ‘HPI’ },
    { name: ‘BuildCost’ },
    { name: ‘Population’ },
    { name: ‘Rate’ }
    ],
    url: ‘chartdata/homeprices.txt’
    };
    var dataAdapter = new $.jqx.dataAdapter(source, { async: false, autoBind: true, loadError: function (xhr, status, error) { alert(‘Error loading “‘ + source.url + ‘” : ‘ + error); } });
    // prepare jqxChart settings
    var settings = {
    title: “”,
    description: “”,
    enableAnimations: true,
    showLegend: true,
    padding: { left: 5, top: 5, right: 25, bottom: 5 },
    titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },
    source: dataAdapter,
    categoryAxis:
    {
    text: ‘Category Axis’,
    textRotationAngle: 0,
    dataField: ‘Year’,
    showTickMarks: true,
    tickMarksInterval: 1,
    tickMarksColor: ‘#888888’,
    unitInterval: 1,
    showGridLines: true,
    gridLinesInterval: 1,
    gridLinesColor: ‘#888888’,
    //axisSize: ‘auto’,
    minValue: 2001,
    maxValue: 2014
    },
    colorScheme: ‘scheme04’,
    seriesGroups:
    [
    {
    type: ‘line’,
    valueAxis:
    {
    unitInterval: 1000,
    description: ‘U.S. Population (millions)’,
    showGridLines: false
    },
    series: [
    { dataField: ‘Population’, displayText: ‘Population’ }
    ]
    },
    {
    type: ‘spline’,
    valueAxis:
    {
    unitInterval: 100,
    displayValueAxis: false,
    displayGridLines: false
    },
    series: [
    { dataField: ‘Rate’, displayText: ‘Interest Rate’ }
    ]
    },
    {
    type: ‘spline’,
    valueAxis:
    {
    unitInterval: 100,
    description: ‘Index Value’
    },
    series: [
    { dataField: ‘HPI’, displayText: ‘Real Home Price Index’ },
    { dataField: ‘BuildCost’, displayText: ‘Building Cost Index’ }
    ]
    }
    ]
    };
    // setup the chart
    $(‘#jqxChart3’).jqxChart(settings);
    });

Viewing 1 post (of 1 total)