T O P I C R E V I E W |
wryates |
Posted - 23 Jul 2014 : 14:58:49 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 |
5 L A T E S T R E P L I E S (Newest First) |
wryates |
Posted - 28 Jul 2014 : 09:13:16 Thanks!
This worked perfectly. |
quinncurtis |
Posted - 25 Jul 2014 : 17:46:00 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
}
}
} |
quinncurtis |
Posted - 25 Jul 2014 : 14:49:08 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. |
wryates |
Posted - 24 Jul 2014 : 15:39:28 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? |
quinncurtis |
Posted - 23 Jul 2014 : 17:20:01 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. |
|
|