jQWidgets Forums

jQuery UI Widgets Forums Chart OHLC points not rendered

This topic contains 10 replies, has 2 voices, and was last updated by  Dimitar 10 years, 3 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • OHLC points not rendered #67155

    fuser
    Participant

    This is my array of points (some points don’t have y points – is that the reason?) . Below are the settings for the series and the source used.

    
    dataFieldHigh: 'upperCI',
    displayTextHigh: 'Upper 95% CI',
    dataFieldOpen: 'upperCI',
    displayTextOpen: 'Upper 95% CI',
    dataFieldLow: 'lowerCI',
    displayTextLow: 'Lower 95% CI',
    displayTextClose: 'Lower 95% CI',
    dataFieldClose: 'lowerCI',
    

    Only 17 OHLC points render , but obviously upperCI and lowerCI are present in more than 17 array entries in the following array.

    I get this error in the console:

    Error: Invalid value for <path> attribute d=”M82.5,undefined L82.5,undefined M65.6484375,undefined L82.5,undefined M99.3515625,undefined L82.5,undefined”

    What might be the problem? Are there specific requirements for the data formatting of the OHLC?

    Thank you.

    
    [{"x":0},{"x":0.02739726025,"upperCI":0.99781845853024,"lowerCI":0.89577358404735},{"x":0.16438356166666665,"upperCI":0.99781845853024,"lowerCI":0.89577358404735},{"x":0.20547945208333332,"upperCI":0.99215322555567,"lowerCI":0.88162153462666},{"x":0.3205479451666667,"upperCI":0.98471634951049,"lowerCI":0.86231626863205},{"x":0.38904109591666663,"upperCI":0.98471634951049,"lowerCI":0.86231626863205},{"x":0.4931506849166667,"upperCI":0.98471634951049,"lowerCI":0.86231626863205},{"x":0.57808219175,"upperCI":0.97596587468104,"lowerCI":0.84120420259312},{"x":0.7095890410833333,"upperCI":0.96637051344564,"lowerCI":0.82055946345163},{"x":1},{"x":1.3835616441666667,"upperCI":0.95612816224644,"lowerCI":0.80037078671009},{"x":1.3972602741666666,"upperCI":0.95612816224644,"lowerCI":0.80037078671009},{"x":1.61369863,"upperCI":0.95612816224644,"lowerCI":0.80037078671009},{"x":1.6739726025000001,"upperCI":0.94508072909374,"lowerCI":0.77942243405453},{"x":1.7890410958333334,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2},{"x":2.0054794516666665,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.0082191783333334,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.2602739725,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.3424657533333333,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.37260274,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.6575342466666667,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.7917808216666664,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.8246575341666667,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.9479452058333333,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3},{"x":3.479452055,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3.668493150833333,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3.720547945,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3.9753424658333336,"upperCI":0.91927615806921,"lowerCI":0.72927948113036},{"x":4},{"x":4.101369863333333,"upperCI":0.90430047956726,"lowerCI":0.70114284364517},{"x":4.202739725833333,"upperCI":0.90430047956726,"lowerCI":0.70114284364517},{"x":4.301369863333333,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.306849315,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.3397260275,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.6328767125,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.906849315,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.9808219175,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":5},{"x":5.005479451666667,"upperCI":0.87033511842329,"lowerCI":0.63950125035881},{"x":5.2465753425,"upperCI":0.85146480339114,"lowerCI":0.60753964692511},{"x":5.405479451666667,"upperCI":0.85146480339114,"lowerCI":0.60753964692511},{"x":5.4465753425,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.5369863016666665,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.591780821666667,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.602739725833334,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.701369863333333,"upperCI":0.8091532607654,"lowerCI":0.53858007632238},{"x":5.7260273975,"upperCI":0.8091532607654,"lowerCI":0.53858007632238},{"x":6},{"x":6.0712328766666666,"upperCI":0.8091532607654,"lowerCI":0.53858007632238},{"x":6.252054794166667,"upperCI":0.78459536275897,"lowerCI":0.49876172811567},{"x":6.57260274,"upperCI":0.78459536275897,"lowerCI":0.49876172811567},{"x":6.652054794166666,"upperCI":0.75817685048203,"lowerCI":0.45814108513433},{"x":7},{"x":7.323287670833333,"upperCI":0.75817685048203,"lowerCI":0.45814108513433},{"x":7.3534246575,"upperCI":0.72967356202283,"lowerCI":0.41637287066146},{"x":7.605479451666667,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":7.6465753425,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":8},{"x":8.345205483333332,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":9},{"x":9.413698633333334,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":9.723287675,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":9.813698633333333,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":10},{"x":10.202739724999999,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":10.59452055,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":10.769863016666667,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":11},{"x":11.232876708333334,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":11.715068491666665,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":11.767123291666666,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":12},{"x":12.764383558333334,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":13},{"x":13.780821916666667,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":14},{"x":14.079452058333333,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":14.841095891666667,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":15}]
    
    OHLC points not rendered #67165

    Dimitar
    Participant

    Hello fuser,

    As in the demo, there has to be a value for each data point’s open, high, low and close points in order for the chart to be plotted correctly.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    OHLC points not rendered #67203

    fuser
    Participant

    Thank you for the reply.

    So if there are x values without the corresponding datapoints for the OHLC series, it will not work? I guess I need to use a different source that has only x points with corresponding OHLC points ONLY? (ie, no “orphan” x-points) ?

    OHLC points not rendered #67205

    fuser
    Participant

    Ok i tried with the following data (no “orphan x” values), and the same results. dataFieldHigh = dataFieldOpen and dataFieldLow = dataFieldClose (as mentioned in the first post).

    Please advise.

    [{"x":0.02739726025,"upperCI":0.99781845853024,"lowerCI":0.89577358404735},{"x":0.16438356166666665,"upperCI":0.99781845853024,"lowerCI":0.89577358404735},{"x":0.20547945208333332,"upperCI":0.99215322555567,"lowerCI":0.88162153462666},{"x":0.3205479451666667,"upperCI":0.98471634951049,"lowerCI":0.86231626863205},{"x":0.38904109591666663,"upperCI":0.98471634951049,"lowerCI":0.86231626863205},{"x":0.4931506849166667,"upperCI":0.98471634951049,"lowerCI":0.86231626863205},{"x":0.57808219175,"upperCI":0.97596587468104,"lowerCI":0.84120420259312},{"x":0.7095890410833333,"upperCI":0.96637051344564,"lowerCI":0.82055946345163},{"x":1.3835616441666667,"upperCI":0.95612816224644,"lowerCI":0.80037078671009},{"x":1.3972602741666666,"upperCI":0.95612816224644,"lowerCI":0.80037078671009},{"x":1.61369863,"upperCI":0.95612816224644,"lowerCI":0.80037078671009},{"x":1.6739726025000001,"upperCI":0.94508072909374,"lowerCI":0.77942243405453},{"x":1.7890410958333334,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.0054794516666665,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.0082191783333334,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.2602739725,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.3424657533333333,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.37260274,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.6575342466666667,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.7917808216666664,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.8246575341666667,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":2.9479452058333333,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3.479452055,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3.668493150833333,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3.720547945,"upperCI":0.93356330255867,"lowerCI":0.75898063330981},{"x":3.9753424658333336,"upperCI":0.91927615806921,"lowerCI":0.72927948113036},{"x":4.101369863333333,"upperCI":0.90430047956726,"lowerCI":0.70114284364517},{"x":4.202739725833333,"upperCI":0.90430047956726,"lowerCI":0.70114284364517},{"x":4.301369863333333,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.306849315,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.3397260275,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.6328767125,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.906849315,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":4.9808219175,"upperCI":0.88845487471493,"lowerCI":0.67308487421707},{"x":5.005479451666667,"upperCI":0.87033511842329,"lowerCI":0.63950125035881},{"x":5.2465753425,"upperCI":0.85146480339114,"lowerCI":0.60753964692511},{"x":5.405479451666667,"upperCI":0.85146480339114,"lowerCI":0.60753964692511},{"x":5.4465753425,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.5369863016666665,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.591780821666667,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.602739725833334,"upperCI":0.83147167579728,"lowerCI":0.5752751505541},{"x":5.701369863333333,"upperCI":0.8091532607654,"lowerCI":0.53858007632238},{"x":5.7260273975,"upperCI":0.8091532607654,"lowerCI":0.53858007632238},{"x":6.0712328766666666,"upperCI":0.8091532607654,"lowerCI":0.53858007632238},{"x":6.252054794166667,"upperCI":0.78459536275897,"lowerCI":0.49876172811567},{"x":6.57260274,"upperCI":0.78459536275897,"lowerCI":0.49876172811567},{"x":6.652054794166666,"upperCI":0.75817685048203,"lowerCI":0.45814108513433},{"x":7.323287670833333,"upperCI":0.75817685048203,"lowerCI":0.45814108513433},{"x":7.3534246575,"upperCI":0.72967356202283,"lowerCI":0.41637287066146},{"x":7.605479451666667,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":7.6465753425,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":8.345205483333332,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":9.413698633333334,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":9.723287675,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":9.813698633333333,"upperCI":0.69998779446973,"lowerCI":0.3768210535556},{"x":10.202739724999999,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":10.59452055,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":10.769863016666667,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":11.232876708333334,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":11.715068491666665,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":11.767123291666666,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":12.764383558333334,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":13.780821916666667,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":14.079452058333333,"upperCI":0.66144380872364,"lowerCI":0.31039625675203},{"x":14.841095891666667,"upperCI":0.66144380872364,"lowerCI":0.31039625675203}]

    OHLC points not rendered #67208

    Dimitar
    Participant

    Hi fuser,

    The following example with your data works fine on our side and throws no errors:

    <!DOCTYPE html />
    <html lang="en">
    <head>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdraw.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxchart.core.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxchart.rangeselector.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                var data = '[ { "x": 0.02739726025, "upperCI": 0.99781845853024, "lowerCI": 0.89577358404735 }, { "x": 0.16438356166666665, "upperCI": 0.99781845853024, "lowerCI": 0.89577358404735 }, { "x": 0.20547945208333332, "upperCI": 0.99215322555567, "lowerCI": 0.88162153462666 }, { "x": 0.3205479451666667, "upperCI": 0.98471634951049, "lowerCI": 0.86231626863205 }, { "x": 0.38904109591666663, "upperCI": 0.98471634951049, "lowerCI": 0.86231626863205 }, { "x": 0.4931506849166667, "upperCI": 0.98471634951049, "lowerCI": 0.86231626863205 }, { "x": 0.57808219175, "upperCI": 0.97596587468104, "lowerCI": 0.84120420259312 }, { "x": 0.7095890410833333, "upperCI": 0.96637051344564, "lowerCI": 0.82055946345163 }, { "x": 1.3835616441666667, "upperCI": 0.95612816224644, "lowerCI": 0.80037078671009 }, { "x": 1.3972602741666666, "upperCI": 0.95612816224644, "lowerCI": 0.80037078671009 }, { "x": 1.61369863, "upperCI": 0.95612816224644, "lowerCI": 0.80037078671009 }, { "x": 1.6739726025000001, "upperCI": 0.94508072909374, "lowerCI": 0.77942243405453 }, { "x": 1.7890410958333334, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.0054794516666665, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.0082191783333334, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.2602739725, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.3424657533333333, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.37260274, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.6575342466666667, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.7917808216666664, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.8246575341666667, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.9479452058333333, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.479452055, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.668493150833333, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.720547945, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.9753424658333336, "upperCI": 0.91927615806921, "lowerCI": 0.72927948113036 }, { "x": 4.101369863333333, "upperCI": 0.90430047956726, "lowerCI": 0.70114284364517 }, { "x": 4.202739725833333, "upperCI": 0.90430047956726, "lowerCI": 0.70114284364517 }, { "x": 4.301369863333333, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.306849315, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.3397260275, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.6328767125, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.906849315, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.9808219175, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 5.005479451666667, "upperCI": 0.87033511842329, "lowerCI": 0.63950125035881 }, { "x": 5.2465753425, "upperCI": 0.85146480339114, "lowerCI": 0.60753964692511 }, { "x": 5.405479451666667, "upperCI": 0.85146480339114, "lowerCI": 0.60753964692511 }, { "x": 5.4465753425, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.5369863016666665, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.591780821666667, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.602739725833334, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.701369863333333, "upperCI": 0.8091532607654, "lowerCI": 0.53858007632238 }, { "x": 5.7260273975, "upperCI": 0.8091532607654, "lowerCI": 0.53858007632238 }, { "x": 6.0712328766666666, "upperCI": 0.8091532607654, "lowerCI": 0.53858007632238 }, { "x": 6.252054794166667, "upperCI": 0.78459536275897, "lowerCI": 0.49876172811567 }, { "x": 6.57260274, "upperCI": 0.78459536275897, "lowerCI": 0.49876172811567 }, { "x": 6.652054794166666, "upperCI": 0.75817685048203, "lowerCI": 0.45814108513433 }, { "x": 7.323287670833333, "upperCI": 0.75817685048203, "lowerCI": 0.45814108513433 }, { "x": 7.3534246575, "upperCI": 0.72967356202283, "lowerCI": 0.41637287066146 }, { "x": 7.605479451666667, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 7.6465753425, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 8.345205483333332, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 9.413698633333334, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 9.723287675, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 9.813698633333333, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 10.202739724999999, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 10.59452055, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 10.769863016666667, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 11.232876708333334, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 11.715068491666665, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 11.767123291666666, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 12.764383558333334, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 13.780821916666667, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 14.079452058333333, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 14.841095891666667, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 } ]';
    
                var source =
                {
                    datatype: "json",
                    datafields: [
                        { name: 'x' },
                        { name: 'upperCI' },
                        { name: 'lowerCI' }
                        ],
                    localdata: data
                };
    
                var dataAdapter = new $.jqx.dataAdapter(source, { async: false, autoBind: true, loadError: function (xhr, status, error) { alert('Error loading "' + source.url + '" : ' + error); } });
    
                var settings = {
                    title: "NASDAQ and S&P 500 - OHLC Example",
                    description: "(June 2010 - November 2014)",
                    enableAnimations: true,
                    animationDuration: 1500,
                    enableCrosshairs: true,
                    padding: { left: 5, top: 5, right: 5, bottom: 5 },
                    source: dataAdapter,
                    colorScheme: 'scheme01',
                    xAxis:
                    {
                        dataField: 'x',
                        valuesOnTicks: true
                    },
                    seriesGroups:
                        [
                            {
                                type: 'ohlc',
                                valueAxis:
                                {
                                    description: 'S&P 500<br>'
                                },
                                series: [
                                    {
                                        dataFieldClose: 'lowerCI',
                                        displayTextClose: 'S&P Close price',
                                        dataFieldOpen: 'upperCI',
                                        displayTextOpen: 'S&P Open price',
                                        dataFieldHigh: 'upperCI',
                                        displayTextHigh: 'S&P High price',
                                        dataFieldLow: 'lowerCI',
                                        displayTextLow: 'S&P Low price',
                                        displayText: 'S&P 500',
                                        lineWidth: 1
                                    }
                                ]
                            }
                        ]
                };
    
                $('#chartContainer').jqxChart(settings);
            });
        </script>
    </head>
    <body class='default'>
        <div id='chartContainer' style="width: 800px; height: 500px;">
        </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    OHLC points not rendered #67265

    fuser
    Participant

    Ok it still doesn’t work. I removed my other series as well, i even removed type: “linear” from my x-axis just in case. Same thing. I don’t know whats wrong.

     Error: Invalid value for <path> attribute d="M68.5,undefined L68.5,undefined M52.3984375,undefined L68.5,undefined M84.6015625,undefined L68.5,undefined"
    jqxdraw.js:7 Error: Invalid value for <path> attribute d="M111.5,undefined L111.5,undefined M95.3984375,undefined L111.5,undefined M127.6015625,undefined L111.5,undefined"
    jqxdraw.js:7 Error: Invalid value for <path> attribute d="M326.5,undefined L326.5,undefined M310.3984375,undefined L326.5,undefined M342.6015625,undefined L326.5,undefined"
    jqxdraw.js:7 Error: Invalid value for <path> attribute d="M369.5,undefined L369.5,undefined M353.3984375,undefined L369.5,undefined M385.6015625,undefined L369.5,undefined"
    jqxdraw.js:7 Error: Invalid value for <path> attribute d="M411.5,undefined L411.5,undefined M395.3984375,undefined L411.5,undefined M427.6015625,undefined L411.5,undefined"
    jqxdraw.js:7 Error: Invalid value for <path> attribute d="M454.5,undefined L454.5,undefined M438.3984375,undefined L454.5,undefined M470.6015625,undefined L454.5,undefined"
    OHLC points not rendered #67284

    Dimitar
    Participant

    Hi fuser,

    Does our example not work on your side? Please make sure you are using the latest version of jQWidgets (3.7.0) and test it again.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    OHLC points not rendered #67323

    fuser
    Participant

    I am using the latest version yes. You can see here that not all 65 entries are rendered. The problem still persists but this time without errors. Is there a limitation to how close the linear x-values are ?

    OHLC points not rendered #67341

    Dimitar
    Participant

    Hi fuser,

    If you want all data points plotted you can set the xAxis type to ‘basic’:

    xAxis:
    {
        dataField: 'x',
        valuesOnTicks: true,
        type: 'basic'
    },

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    OHLC points not rendered #67376

    fuser
    Participant

    I see. it works this way. However that is not an option for me because I shall have another 4 lines on this graph that are messing up if the x-axis is not linear. Is there a way around this? x-axis type per serie?

    type = basic doesnt seem to obey the tickmark interval, min and max properties.

    OHLC points not rendered #67395

    Dimitar
    Participant

    Hi fuser,

    If you wish the xAxis to be ‘linear’ and display all data points, you can set the OHLC series group property skipOverlappingPoints to false, i.e.:

    <!DOCTYPE html />
    <html lang="en">
    <head>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdraw.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxchart.core.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxchart.rangeselector.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                var data = '[ { "x": 0.02739726025, "upperCI": 0.99781845853024, "lowerCI": 0.89577358404735 }, { "x": 0.16438356166666665, "upperCI": 0.99781845853024, "lowerCI": 0.89577358404735 }, { "x": 0.20547945208333332, "upperCI": 0.99215322555567, "lowerCI": 0.88162153462666 }, { "x": 0.3205479451666667, "upperCI": 0.98471634951049, "lowerCI": 0.86231626863205 }, { "x": 0.38904109591666663, "upperCI": 0.98471634951049, "lowerCI": 0.86231626863205 }, { "x": 0.4931506849166667, "upperCI": 0.98471634951049, "lowerCI": 0.86231626863205 }, { "x": 0.57808219175, "upperCI": 0.97596587468104, "lowerCI": 0.84120420259312 }, { "x": 0.7095890410833333, "upperCI": 0.96637051344564, "lowerCI": 0.82055946345163 }, { "x": 1.3835616441666667, "upperCI": 0.95612816224644, "lowerCI": 0.80037078671009 }, { "x": 1.3972602741666666, "upperCI": 0.95612816224644, "lowerCI": 0.80037078671009 }, { "x": 1.61369863, "upperCI": 0.95612816224644, "lowerCI": 0.80037078671009 }, { "x": 1.6739726025000001, "upperCI": 0.94508072909374, "lowerCI": 0.77942243405453 }, { "x": 1.7890410958333334, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.0054794516666665, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.0082191783333334, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.2602739725, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.3424657533333333, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.37260274, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.6575342466666667, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.7917808216666664, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.8246575341666667, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 2.9479452058333333, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.479452055, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.668493150833333, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.720547945, "upperCI": 0.93356330255867, "lowerCI": 0.75898063330981 }, { "x": 3.9753424658333336, "upperCI": 0.91927615806921, "lowerCI": 0.72927948113036 }, { "x": 4.101369863333333, "upperCI": 0.90430047956726, "lowerCI": 0.70114284364517 }, { "x": 4.202739725833333, "upperCI": 0.90430047956726, "lowerCI": 0.70114284364517 }, { "x": 4.301369863333333, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.306849315, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.3397260275, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.6328767125, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.906849315, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 4.9808219175, "upperCI": 0.88845487471493, "lowerCI": 0.67308487421707 }, { "x": 5.005479451666667, "upperCI": 0.87033511842329, "lowerCI": 0.63950125035881 }, { "x": 5.2465753425, "upperCI": 0.85146480339114, "lowerCI": 0.60753964692511 }, { "x": 5.405479451666667, "upperCI": 0.85146480339114, "lowerCI": 0.60753964692511 }, { "x": 5.4465753425, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.5369863016666665, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.591780821666667, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.602739725833334, "upperCI": 0.83147167579728, "lowerCI": 0.5752751505541 }, { "x": 5.701369863333333, "upperCI": 0.8091532607654, "lowerCI": 0.53858007632238 }, { "x": 5.7260273975, "upperCI": 0.8091532607654, "lowerCI": 0.53858007632238 }, { "x": 6.0712328766666666, "upperCI": 0.8091532607654, "lowerCI": 0.53858007632238 }, { "x": 6.252054794166667, "upperCI": 0.78459536275897, "lowerCI": 0.49876172811567 }, { "x": 6.57260274, "upperCI": 0.78459536275897, "lowerCI": 0.49876172811567 }, { "x": 6.652054794166666, "upperCI": 0.75817685048203, "lowerCI": 0.45814108513433 }, { "x": 7.323287670833333, "upperCI": 0.75817685048203, "lowerCI": 0.45814108513433 }, { "x": 7.3534246575, "upperCI": 0.72967356202283, "lowerCI": 0.41637287066146 }, { "x": 7.605479451666667, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 7.6465753425, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 8.345205483333332, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 9.413698633333334, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 9.723287675, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 9.813698633333333, "upperCI": 0.69998779446973, "lowerCI": 0.3768210535556 }, { "x": 10.202739724999999, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 10.59452055, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 10.769863016666667, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 11.232876708333334, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 11.715068491666665, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 11.767123291666666, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 12.764383558333334, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 13.780821916666667, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 14.079452058333333, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 }, { "x": 14.841095891666667, "upperCI": 0.66144380872364, "lowerCI": 0.31039625675203 } ]';
    
                var source =
                {
                    datatype: "json",
                    datafields: [
                        { name: 'x' },
                        { name: 'upperCI' },
                        { name: 'lowerCI' }
                        ],
                    localdata: data
                };
    
                var dataAdapter = new $.jqx.dataAdapter(source, { async: false, autoBind: true, loadError: function (xhr, status, error) { alert('Error loading "' + source.url + '" : ' + error); } });
    
                var settings = {
                    title: "NASDAQ and S&P 500 - OHLC Example",
                    description: "(June 2010 - November 2014)",
                    enableAnimations: true,
                    animationDuration: 1500,
                    enableCrosshairs: true,
                    padding: { left: 5, top: 5, right: 5, bottom: 5 },
                    source: dataAdapter,
                    colorScheme: 'scheme01',
                    xAxis:
                    {
                        dataField: 'x',
                        valuesOnTicks: true
                    },
                    seriesGroups:
                        [
                            {
                                type: 'ohlc',
                                skipOverlappingPoints: false,
                                valueAxis:
                                {
                                    description: 'S&P 500<br>'
                                },
                                series: [
                                    {
                                        dataFieldClose: 'lowerCI',
                                        displayTextClose: 'S&P Close price',
                                        dataFieldOpen: 'upperCI',
                                        displayTextOpen: 'S&P Open price',
                                        dataFieldHigh: 'upperCI',
                                        displayTextHigh: 'S&P High price',
                                        dataFieldLow: 'lowerCI',
                                        displayTextLow: 'S&P Low price',
                                        displayText: 'S&P 500',
                                        lineWidth: 1
                                    }
                                ]
                            }
                        ]
                };
    
                $('#chartContainer').jqxChart(settings);
            });
        </script>
    </head>
    <body class='default'>
        <div id='chartContainer' style="width: 800px; height: 500px;">
        </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.