Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCSPCChart SPC for Java
 Scaling Chart
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wryates

USA
11 Posts

Posted - 23 Jul 2014 :  14:58:49  Show Profile  Reply with Quote
We are trying to use the JavaScript version of the SPC Charting Module and are having some problems with the x axis scaling. When we apply data, it is showing the chart from -100 to 300, but we need it to scale to something like -200 to 200. And the Y Axis is 0 to 100, but we would like it to scale to 0 to 80.

I have tried to use the FrequencyHistogram.ChartSetup.CoordinateSystem to scale, but I could not seem to get it to work.

Here is the JSON:
{
    "StaticProperties": {
        "Canvas": {
            "Width": 1800,
            "Height": 800
        }
    },
    "FrequencyHistogram": {
        "ChartSetup": {
            "MainTitle": {
                "TextColor": "BLACK",
                "Text": "Test Histogram"
            },
            "CoordinateSystem": {
                "MinXScale": 200,
                "MaxXScale": -200
            },
            "XAxisLabels": {
                "TextColor": "BLACK",
                "Rotation": 90,
                "OverlapLabelMode": "OVERLAP_LABEL_DRAW",
                "Decimal": 2
            },
            "HistogramPlot": {
                "LineColor": "BLACK",
                "LineWidth": 1,
                "BarColor": "LIGHTCORAL"
            },
            "ControlLines": [
                {
                    "LimitValue": 0,
                    "LineColor": "RED",
                    "LineWidth": 3
                },
                {
                    "LimitValue": -83.85492931492425,
                    "LineColor": "LAWNGREEN",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 101.58202798159093,
                    "LineColor": "LAWNGREEN",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 8.863549333333333,
                    "LineColor": "BLUE",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 16.248497142857143,
                    "LineColor": "OLIVE",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 2.40172,
                    "LineColor": "PURPLE",
                    "LineWidth": 1
                }
            ],
            "NormalCurveLine": {
                "Enable": true,
                "LineColor": "FORESTGREEN",
                "LineWidth": 3
            }
        },
        "FrequencyHistogramData": {
            "SampleValues": [
                0,
                1,
                2,
                0,
                1,
                1,
                0,
                0,
                1,
                44,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
                2.9703,
                2,
                1.0989,
                0,
                0,
                1,
                0,
                31,
                3,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                14,
                179,
                0,
                1,
                0.0985,
                0.0985,
                0,
                154,
                122,
                12,
                31,
                3,
                0,
                0,
                0,
                2,
                2,
                9,
                0,
                0,
                0,
                0.5,
                0,
                40
            ],
            "FrequencyBins": [
                0,
                8.95,
                17.9,
                26.849999999999998,
                35.8,
                44.75,
                53.7,
                62.650000000000006,
                71.60000000000001,
                80.55000000000001,
                89.50000000000001,
                98.45000000000002,
                107.40000000000002,
                116.35000000000002,
                125.30000000000003,
                134.25000000000003,
                143.20000000000002,
                152.15,
                161.1,
                170.04999999999998
            ]
        },
        "Methods": {
            "RebuildAndDraw": true
        }
    }
}


Thanks,
Russ Yates

quinncurtis

1585 Posts

Posted - 23 Jul 2014 :  17:20:01  Show Profile  Reply with Quote
The Javascript software is not going to be able to have the scaling values you want. There is no way to turn off the auto-scaling of the frequency histogram, which takes into account all frequency bin x-values, frequency y-values, limits lines, normal curve values, etc., rounding to the nearest MAJOR tick mark. There is no way to override those values once the auto-scaling takes place. We will investigate options to do this for future releases of the software.
Go to Top of Page

wryates

USA
11 Posts

Posted - 24 Jul 2014 :  15:39:28  Show Profile  Reply with Quote
Thanks, what about the control line values, they are currently writing horizontally, is there anyway to make them rotate like the bottom labels of the x axis?
Go to Top of Page

quinncurtis

1585 Posts

Posted - 25 Jul 2014 :  14:49:08  Show Profile  Reply with Quote
Sorry, but rotating the control limit labels is not an option. You are the first in to ever suggest it for any of the versions we have.
Go to Top of Page

quinncurtis

1585 Posts

Posted - 25 Jul 2014 :  17:46:00  Show Profile  Reply with Quote
We have found if you place your scaling setup AFTER the data setup, you can override the auto-scaling of the chart based on the data values. Scale the coordinate system for something less than what you want so that chart scales up to the desired values.

Also, your MinXScale and MaxXScale were incorrectly swapped. They are corrected below, and rounded down a bit.

{
    "StaticProperties": {
        "Canvas": {
            "Width": 1800,
            "Height": 800
        }
    },
    "FrequencyHistogram": {
        "FrequencyHistogramData": {
            "SampleValues": [
                0,
                1,
                2,
                0,
                1,
                1,
                0,
                0,
                1,
                44,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
                2.9703,
                2,
                1.0989,
                0,
                0,
                1,
                0,
                31,
                3,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                14,
                179,
                0,
                1,
                0.0985,
                0.0985,
                0,
                154,
                122,
                12,
                31,
                3,
                0,
                0,
                0,
                2,
                2,
                9,
                0,
                0,
                0,
                0.5,
                0,
                40
            ],
            "FrequencyBins": [
                0,
                8.95,
                17.9,
                26.849999999999998,
                35.8,
                44.75,
                53.7,
                62.650000000000006,
                71.60000000000001,
                80.55000000000001,
                89.50000000000001,
                98.45000000000002,
                107.40000000000002,
                116.35000000000002,
                125.30000000000003,
                134.25000000000003,
                143.20000000000002,
                152.15,
                161.1,
                170.04999999999998
            ]
        },
        "ChartSetup": {
            "MainTitle": {
                "TextColor": "BLACK",
                "Text": "Test Histogram"
            },
            "CoordinateSystem": {
                "MinXScale": -190,
                "MaxXScale": 190
            },
            "XAxisLabels": {
                "TextColor": "BLACK",
                "Rotation": 90,
                "OverlapLabelMode": "OVERLAP_LABEL_DRAW",
                "Decimal": 2
            },
            "HistogramPlot": {
                "LineColor": "BLACK",
                "LineWidth": 1,
                "BarColor": "LIGHTCORAL"
            },
            "ControlLines": [
                {
                    "LimitValue": 0,
                    "LineColor": "RED",
                    "LineWidth": 3
                },
                {
                    "LimitValue": -83.85492931492425,
                    "LineColor": "LAWNGREEN",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 101.58202798159093,
                    "LineColor": "LAWNGREEN",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 8.863549333333333,
                    "LineColor": "BLUE",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 16.248497142857143,
                    "LineColor": "OLIVE",
                    "LineWidth": 1
                },
                {
                    "LimitValue": 2.40172,
                    "LineColor": "PURPLE",
                    "LineWidth": 1
                }
            ],
            "NormalCurveLine": {
                "Enable": true,
                "LineColor": "FORESTGREEN",
                "LineWidth": 3
            }
        },
        "Methods": {
            "RebuildAndDraw": true
        }
    }
}
Go to Top of Page

wryates

USA
11 Posts

Posted - 28 Jul 2014 :  09:13:16  Show Profile  Reply with Quote
Thanks!

This worked perfectly.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07