diff --git a/capabilities.json b/capabilities.json index 61a564d..706727e 100644 --- a/capabilities.json +++ b/capabilities.json @@ -1,1149 +1,739 @@ { - "supportsHighlight": true, - "sorting": { - "implicit": { - "clauses": [ - { - "role": "key", - "direction": 1 - } - ] + "supportsHighlight": true, + "sorting": { + "implicit": { + "clauses": [{ + "role": "key", + "direction": 1 + }] + } + }, + "dataRoles": [ + { + "displayName": "Outcome/Numerator", + "name": "numerators", + "kind": "Measure" + }, + { + "displayName": "Denominator", + "name": "denominators", + "kind": "Measure" + }, + { + "displayName": "ID Key (Date or ID for xbar/s)", + "name": "key", + "kind": "Grouping" + }, + { + "displayName": "SD (for xbar)", + "name": "xbar_sds", + "kind": "Measure" + } + ], + "objects": { + "split_indexes_storage" : { + "displayName" : "Hidden", + "properties": { + "split_indexes": { + "displayName": "Hidden", + "type": { "text": true } } + } }, - "dataRoles": [ - { - "displayName": "Outcome/Numerator", - "name": "numerators", - "kind": "Measure" - }, - { - "displayName": "Denominator", - "name": "denominators", - "kind": "Measure" - }, - { - "displayName": "ID Key (Date or ID for xbar/s)", - "name": "key", - "kind": "Grouping" - }, - { - "displayName": "SD (for xbar)", - "name": "xbar_sds", - "kind": "Measure" + "spc" : { + "displayName": "Data Settings", + "properties": { + "chart_type": { + "displayName": "Chart Type", + "type" : { + "enumeration" : [ + { + "displayName" : "run - Run Chart", + "value" : "run" + }, + { + "displayName" : "i - Individual Measurements", + "value" : "i" + }, + { + "displayName" : "mr - Moving Range of Individual Measurements", + "value" : "mr" + }, + { + "displayName" : "p - Proportions", + "value" : "p" + }, + { + "displayName" : "p prime - Proportions Chart with Large Sample Correction", + "value" : "pp" + }, + { + "displayName" : "u - Rates", + "value" : "u" + }, + { + "displayName" : "u prime - Rates Chart with Large Sample Correction", + "value" : "up" + }, + { + "displayName" : "c - Counts", + "value" : "c" + }, + { + "displayName" : "xbar - Sample Means", + "value" : "xbar" + }, + { + "displayName" : "s - Sample SDs", + "value" : "s" + }, + { + "displayName" : "g - Number of Non-Events Between Events", + "value" : "g" + }, + { + "displayName" : "t - Time Between Events", + "value" : "t" + } + ] + } + }, + "outliers_in_limits": { + "displayName": "Keep Outliers in Limit Calcs.", + "type": { "bool": true } + }, + "multiplier": { + "displayName": "Multiplier", + "type": { "numeric": true } + }, + "sig_figs": { + "displayName": "Decimals to Report:", + "type": { "numeric": true } + }, + "perc_labels": { + "displayName": "Report as percentage", + "type": { + "enumeration" : [ + { + "displayName" : "Automatic", + "value" : "Automatic" + }, + { + "displayName" : "Yes", + "value" : "Yes" + }, + { + "displayName" : "No", + "value" : "No" + } + ] + } + }, + "split_on_click": { + "displayName": "Split Limits on Click", + "type" : { "bool" : true } + }, + "ll_truncate": { + "displayName": "Truncate Lower Limits at:", + "type": { "numeric": true } + }, + "ul_truncate": { + "displayName": "Truncate Upper Limits at:", + "type": { "numeric": true } + }, + "alt_target": { + "displayName": "Additional Target Value:", + "type": { "numeric": true } } - ], - "objects": { - "split_indexes_storage" : { - "displayName" : "Hidden", - "properties": { - "split_indexes": { - "displayName": "Hidden", - "type": { "text": true } - } + } + }, + "outliers" : { + "displayName": "Outlier Highlighting", + "properties": { + "process_flag_type": { + "displayName": "Type of Change to Flag", + "type": { + "enumeration" : [ + { + "displayName" : "Both", + "value" : "both" + }, + { + "displayName" : "Improvement (Imp.)", + "value" : "improvement" + }, + { + "displayName" : "Deterioration (Det.)", + "value" : "deterioration" + } + ] + } + }, + "improvement_direction": { + "displayName": "Improvement Direction", + "type": { + "enumeration" : [ + { + "displayName" : "Increase", + "value" : "increase" + }, + { + "displayName" : "Neutral", + "value" : "neutral" + }, + { + "displayName" : "Decrease", + "value" : "decrease" + } + ] } }, - "spc" : { - "displayName": "Data Settings", - "properties": { - "chart_type": { - "displayName": "Chart Type", - "type" : { - "enumeration" : [ - { - "displayName" : "run - Run Chart", - "value" : "run" - }, - { - "displayName" : "i - Individual Measurements", - "value" : "i" - }, - { - "displayName" : "mr - Moving Range of Individual Measurements", - "value" : "mr" - }, - { - "displayName" : "p - Proportions", - "value" : "p" - }, - { - "displayName" : "p prime - Proportions Chart with Large Sample Correction", - "value" : "pp" - }, - { - "displayName" : "u - Rates", - "value" : "u" - }, - { - "displayName" : "u prime - Rates Chart with Large Sample Correction", - "value" : "up" - }, - { - "displayName" : "c - Counts", - "value" : "c" - }, - { - "displayName" : "xbar - Sample Means", - "value" : "xbar" - }, - { - "displayName" : "s - Sample SDs", - "value" : "s" - }, - { - "displayName" : "g - Number of Non-Events Between Events", - "value" : "g" - }, - { - "displayName" : "t - Time Between Events", - "value" : "t" - } - ] - } - }, - "outliers_in_limits": { - "displayName": "Keep Outliers in Limit Calcs.", - "type": { "bool": true } - }, - "multiplier": { - "displayName": "Multiplier", - "type": { - "numeric": true - } - }, - "sig_figs": { - "displayName": "Decimals to Report:", - "type": { - "numeric": true - } - }, - "perc_labels": { - "displayName": "Report as percentage", - "type": { - "enumeration" : [ - { - "displayName" : "Automatic", - "value" : "Automatic" - }, - { - "displayName" : "Yes", - "value" : "Yes" - }, - { - "displayName" : "No", - "value" : "No" - } - ] - } - }, - "split_on_click": { - "displayName": "Split Limits on Click", - "type" : { "bool" : true } - }, - "ll_truncate": { - "displayName": "Truncate Lower Limits at:", - "type": { - "numeric": true - } - }, - "ul_truncate": { - "displayName": "Truncate Upper Limits at:", - "type": { - "numeric": true - } - }, - "alt_target": { - "displayName": "Additional Target Value:", - "type": { - "numeric": true - } - } - } - }, - "outliers" : { - "displayName": "Outlier Highlighting", - "properties": { - "process_flag_type": { - "displayName": "Type of Change to Flag", - "type": { - "enumeration" : [ - { - "displayName" : "Both", - "value" : "both" - }, - { - "displayName" : "Improvement (Imp.)", - "value" : "improvement" - }, - { - "displayName" : "Deterioration (Det.)", - "value" : "deterioration" - } - ] - } + "astronomical": { + "displayName": "Astronomical Points", + "type" : { "bool" : true } + }, + "ast_colour_improvement":{ + "displayName": "Imp. Ast. Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "ast_colour_deterioration":{ + "displayName": "Det. Ast. Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "ast_colour_neutral_low":{ + "displayName": "Neutral (Low) Ast. Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "ast_colour_neutral_high":{ + "displayName": "Neutral (High) Ast. Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "shift": { + "displayName": "Shifts", + "type" : { "bool" : true } + }, + "shift_n": { + "displayName": "Shift Points", + "type" : { "numeric": true } + }, + "shift_colour_improvement":{ + "displayName": "Imp. Shift Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "shift_colour_deterioration":{ + "displayName": "Det. Shift Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "shift_colour_neutral_low":{ + "displayName": "Neutral (Low) Shift Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "shift_colour_neutral_high":{ + "displayName": "Neutral (High) Shift Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "trend": { + "displayName": "Trends", + "type" : { "bool" : true } + }, + "trend_n": { + "displayName": "Trend Points", + "type" : { "numeric": true } + }, + "trend_colour_improvement":{ + "displayName": "Imp. Trend Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "trend_colour_deterioration":{ + "displayName": "Det. Trend Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "trend_colour_neutral_low":{ + "displayName": "Neutral (Low) Trend Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "trend_colour_neutral_high":{ + "displayName": "Neutral (High) Trend Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "two_in_three": { + "displayName": "Two-in-Three", + "type" : { "bool" : true } + }, + "twointhree_colour_improvement":{ + "displayName": "Imp. Two-in-Three Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "twointhree_colour_deterioration":{ + "displayName": "Det. Two-in-Three Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "twointhree_colour_neutral_low":{ + "displayName": "Neutral (Low) Two-in-Three Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "twointhree_colour_neutral_high":{ + "displayName": "Neutral (High) Two-in-Three Colour", + "type": { "fill": { "solid": { "color": true } } } + } + } + }, + "nhs_icons" : { + "displayName": "NHS Icons", + "properties": { + "show_variation_icons": { + "displayName": "Show Variation Icons", + "type" : { "bool" : true } + }, + "flag_variation_last": { + "displayName": "Flag Only Last Point", + "type" : { "bool" : true } + }, + "variation_icons_locations": { + "displayName": "Variation Icon Locations", + "type": { + "enumeration" : [ + { + "displayName" : "Top Right", + "value" : "Top Right" }, - "improvement_direction": { - "displayName": "Improvement Direction", - "type": { - "enumeration" : [ - { - "displayName" : "Increase", - "value" : "increase" - }, - { - "displayName" : "Neutral", - "value" : "neutral" - }, - { - "displayName" : "Decrease", - "value" : "decrease" - } - ] - } + { + "displayName" : "Bottom Right", + "value" : "Bottom Right" }, - "astronomical": { - "displayName": "Astronomical Points", - "type" : { "bool" : true } - }, - "ast_colour_improvement":{ - "displayName": "Imp. Ast. Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "ast_colour_deterioration":{ - "displayName": "Det. Ast. Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "ast_colour_neutral_low":{ - "displayName": "Neutral (Low) Ast. Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "ast_colour_neutral_high":{ - "displayName": "Neutral (High) Ast. Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "shift": { - "displayName": "Shifts", - "type" : { "bool" : true } - }, - "shift_n": { - "displayName": "Shift Points", - "type" : { "numeric": true } - }, - "shift_colour_improvement":{ - "displayName": "Imp. Shift Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "shift_colour_deterioration":{ - "displayName": "Det. Shift Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "shift_colour_neutral_low":{ - "displayName": "Neutral (Low) Shift Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "shift_colour_neutral_high":{ - "displayName": "Neutral (High) Shift Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "trend": { - "displayName": "Trends", - "type" : { "bool" : true } - }, - "trend_n": { - "displayName": "Trend Points", - "type" : { "numeric": true } - }, - "trend_colour_improvement":{ - "displayName": "Imp. Trend Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "trend_colour_deterioration":{ - "displayName": "Det. Trend Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "trend_colour_neutral_low":{ - "displayName": "Neutral (Low) Trend Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "trend_colour_neutral_high":{ - "displayName": "Neutral (High) Trend Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "two_in_three": { - "displayName": "Two-in-Three", - "type" : { "bool" : true } - }, - "twointhree_colour_improvement":{ - "displayName": "Imp. Two-in-Three Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "twointhree_colour_deterioration":{ - "displayName": "Det. Two-in-Three Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "twointhree_colour_neutral_low":{ - "displayName": "Neutral (Low) Two-in-Three Colour", - "type": { "fill": { "solid": { "color": true } } } - }, - "twointhree_colour_neutral_high":{ - "displayName": "Neutral (High) Two-in-Three Colour", - "type": { "fill": { "solid": { "color": true } } } - } - } - }, - "nhs_icons" : { - "displayName": "NHS Icons", - "properties": { - "show_variation_icons": { - "displayName": "Show Variation Icons", - "type" : { "bool" : true } + { + "displayName" : "Top Left", + "value" : "Top Left" + }, + { + "displayName" : "Bottom Left", + "value" : "Bottom Left" + } + ] + } + }, + "variation_icons_scaling":{ + "displayName": "Scale Variation Icon Size", + "type": { "numeric": true } + } + } + }, + "canvas": { + "displayName": "Canvas Settings", + "properties": { + "lower_padding":{ + "displayName": "Padding Below Plot (pixels):", + "type": { "numeric": true } + }, + "upper_padding":{ + "displayName": "Padding Above Plot (pixels):", + "type": { "numeric": true } + }, + "left_padding":{ + "displayName": "Padding Left of Plot (pixels):", + "type": { "numeric": true } + }, + "right_padding":{ + "displayName": "Padding Right of Plot (pixels):", + "type": { "numeric": true } + } + } + }, + "scatter": { + "displayName": "Scatter Settings", + "properties": { + "size": { + "displayName": "Dot Size", + "type": { "numeric": true } + }, + "opacity": { + "displayName": "Opacity", + "type": { "numeric": true } + }, + "opacity_unselected": { + "displayName": "Opacity if Unselected", + "type": { "numeric": true } + }, + "colour":{ + "displayName": "Colour", + "type": { "fill": { "solid": { "color": true } } } + } + } + }, + "dates": { + "displayName": "Date Format", + "properties": { + "date_format_locale": { + "displayName": "Locale", + "type": { + "enumeration" : [ + { + "displayName" : "en-GB", + "value" : "en-GB" }, - "flag_variation_last": { - "displayName": "Flag Only Last Point", - "type" : { "bool" : true } + { + "displayName" : "en-US", + "value" : "en-US" + } + ] + } + }, + "date_format_day": { + "displayName": "Day Format", + "type": { + "enumeration" : [ + { + "displayName" : "DD", + "value" : "DD" }, - "variation_icons_locations": { - "displayName": "Variation Icon Locations", - "type": { - "enumeration" : [ - { - "displayName" : "Top Right", - "value" : "Top Right" - }, - { - "displayName" : "Bottom Right", - "value" : "Bottom Right" - }, - { - "displayName" : "Top Left", - "value" : "Top Left" - }, - { - "displayName" : "Bottom Left", - "value" : "Bottom Left" - } - ] - } + { + "displayName" : "Thurs DD", + "value" : "Thurs DD" }, - "variation_icons_scaling":{ - "displayName": "Scale Variation Icon Size", - "type": { "numeric": true } + { + "displayName" : "Thursday DD", + "value" : "Thursday DD" } - } - }, - "canvas": { - "displayName": "Canvas Settings", - "properties": { - "lower_padding":{ - "displayName": "Padding Below Plot (pixels):", - "type": { "numeric": true } + ] + } + }, + "date_format_month": { + "displayName": "Month Format", + "type": { + "enumeration" : [ + { + "displayName" : "MM", + "value" : "MM" }, - "upper_padding":{ - "displayName": "Padding Above Plot (pixels):", - "type": { "numeric": true } + { + "displayName" : "Mon", + "value" : "Mon" }, - "left_padding":{ - "displayName": "Padding Left of Plot (pixels):", - "type": { "numeric": true } + { + "displayName" : "Month", + "value" : "Month" + } + ] + } + }, + "date_format_year": { + "displayName": "Year Format", + "type": { + "enumeration" : [ + { + "displayName" : "YYYY", + "value" : "YYYY" }, - "right_padding":{ - "displayName": "Padding Right of Plot (pixels):", - "type": { "numeric": true } + { + "displayName" : "YY", + "value" : "YY" } - } - }, - "scatter": { - "displayName": "Scatter Settings", - "properties": { - "size": { - "displayName": "Dot Size", - "type": { - "numeric": true - } - }, - "opacity": { - "displayName": "Opacity", - "type": { - "numeric": true - } - }, - "opacity_unselected": { - "displayName": "Opacity if Unselected", - "type": { - "numeric": true - } - }, - "colour":{ - "displayName": "Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - } - } - }, - "dates": { - "displayName": "Date Format", - "properties": { - "date_format_locale": { - "displayName": "Locale", - "type": { - "enumeration" : [ - { - "displayName" : "en-GB", - "value" : "en-GB" - }, - { - "displayName" : "en-US", - "value" : "en-US" - } - ] + ] + } + }, + "date_format_delim": { + "displayName": "Delimiter", + "type": { + "enumeration" : [ + { + "displayName" : "/", + "value" : "/" + }, + { + "displayName" : "-", + "value" : "-" + }, + { + "displayName" : " ", + "value" : " " } - }, - "date_format_day": { - "displayName": "Day Format", - "type": { - "enumeration" : [ - { - "displayName" : "DD", - "value" : "DD" - }, - { - "displayName" : "Thurs DD", - "value" : "Thurs DD" - }, - { - "displayName" : "Thursday DD", - "value" : "Thursday DD" - } - ] + ] + } + } + } + }, + "lines": { + "displayName": "Line Settings", + "properties": { + "width_99": { + "displayName": "99.8% Line Width", + "type": { "numeric": true } + }, + "width_95": { + "displayName": "95% Line Width", + "type": { "numeric": true } + }, + "width_main": { + "displayName": "Main Line Width", + "type": { "numeric": true } + }, + "width_target": { + "displayName": "Target Line Width", + "type": { "numeric": true } + }, + "width_alt_target": { + "displayName": "Alt. Target Line Width", + "type": { "numeric": true } + }, + "type_99": { + "displayName": "99.8% Line Type", + "type": { + "enumeration" : [ + { + "displayName" : "Solid", + "value" : "10 0" + }, + { + "displayName" : "Dashed", + "value" : "10 10" + }, + { + "displayName" : "Dotted", + "value" : "2 5" } - }, - "date_format_month": { - "displayName": "Month Format", - "type": { - "enumeration" : [ - { - "displayName" : "MM", - "value" : "MM" - }, - { - "displayName" : "Mon", - "value" : "Mon" - }, - { - "displayName" : "Month", - "value" : "Month" - } - ] + ] + } + }, + "type_95": { + "displayName": "95% Line Type", + "type": { + "enumeration" : [ + { + "displayName" : "Solid", + "value" : "10 0" + }, + { + "displayName" : "Dashed", + "value" : "10 10" + }, + { + "displayName" : "Dotted", + "value" : "2 5" } - }, - "date_format_year": { - "displayName": "Year Format", - "type": { - "enumeration" : [ - { - "displayName" : "YYYY", - "value" : "YYYY" - }, - { - "displayName" : "YY", - "value" : "YY" - } - ] + ] + } + }, + "type_main": { + "displayName": "Main Line Type", + "type": { + "enumeration" : [ + { + "displayName" : "Solid", + "value" : "10 0" + }, + { + "displayName" : "Dashed", + "value" : "10 10" + }, + { + "displayName" : "Dotted", + "value" : "2 5" } - }, - "date_format_delim": { - "displayName": "Delimiter", - "type": { - "enumeration" : [ - { - "displayName" : "/", - "value" : "/" - }, - { - "displayName" : "-", - "value" : "-" - }, - { - "displayName" : " ", - "value" : " " - } - ] + ] + } + }, + "type_target": { + "displayName": "Target Line Type", + "type": { + "enumeration" : [ + { + "displayName" : "Solid", + "value" : "10 0" + }, + { + "displayName" : "Dashed", + "value" : "10 10" + }, + { + "displayName" : "Dotted", + "value" : "2 5" } - } + ] } }, - "lines": { - "displayName": "Line Settings", - "properties": { - "width_99": { - "displayName": "99.8% Line Width", - "type": { - "numeric": true - } - }, - "width_95": { - "displayName": "95% Line Width", - "type": { - "numeric": true - } - }, - "width_main": { - "displayName": "Main Line Width", - "type": { - "numeric": true - } - }, - "width_target": { - "displayName": "Target Line Width", - "type": { - "numeric": true - } - }, - "width_alt_target": { - "displayName": "Alt. Target Line Width", - "type": { - "numeric": true - } - }, - "type_99": { - "displayName": "99.8% Line Type", - "type": { - "enumeration" : [ - { - "displayName" : "Solid", - "value" : "10 0" - }, - { - "displayName" : "Dashed", - "value" : "10 10" - }, - { - "displayName" : "Dotted", - "value" : "2 5" - } - ] - } - }, - "type_95": { - "displayName": "95% Line Type", - "type": { - "enumeration" : [ - { - "displayName" : "Solid", - "value" : "10 0" - }, - { - "displayName" : "Dashed", - "value" : "10 10" - }, - { - "displayName" : "Dotted", - "value" : "2 5" - } - ] - } - }, - "type_main": { - "displayName": "Main Line Type", - "type": { - "enumeration" : [ - { - "displayName" : "Solid", - "value" : "10 0" - }, - { - "displayName" : "Dashed", - "value" : "10 10" - }, - { - "displayName" : "Dotted", - "value" : "2 5" - } - ] - } - }, - "type_target": { - "displayName": "Target Line Type", - "type": { - "enumeration" : [ - { - "displayName" : "Solid", - "value" : "10 0" - }, - { - "displayName" : "Dashed", - "value" : "10 10" - }, - { - "displayName" : "Dotted", - "value" : "2 5" - } - ] - } - }, - "type_alt_target": { - "displayName": "Alt. Target Line Type", - "type": { - "enumeration" : [ - { - "displayName" : "Solid", - "value" : "10 0" - }, - { - "displayName" : "Dashed", - "value" : "10 10" - }, - { - "displayName" : "Dotted", - "value" : "2 5" - } - ] - } - }, - "colour_99":{ - "displayName": "99.8% Line Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "colour_95":{ - "displayName": "95% Line Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "colour_main":{ - "displayName": "Main Line Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "colour_target":{ - "displayName": "Target Line Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "colour_alt_target":{ - "displayName": "Alt. Target Line Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - } - } - }, - "x_axis": { - "displayName": "X-Axis Settings", - "properties": { - "xlimit_colour":{ - "displayName": "Axis Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } + "type_alt_target": { + "displayName": "Alt. Target Line Type", + "type": { + "enumeration" : [ + { + "displayName" : "Solid", + "value" : "10 0" + }, + { + "displayName" : "Dashed", + "value" : "10 10" }, - "xlimit_ticks": { - "displayName": "Draw Ticks", - "type" : { "bool" : true } - }, - "xlimit_tick_font": { - "displayName": "Tick Font", - "type": { - "enumeration" : [ - { - "displayName" : "Arial", - "value" : "'Arial', sans-serif" - }, - { - "displayName" : "Verdana", - "value" : "'Verdana', sans-serif" - }, - { - "displayName" : "Tahoma", - "value" : "'Tahoma', sans-serif" - }, - { - "displayName" : "Trebuchet MS", - "value" : "'Trebuchet MS', sans-serif" - }, - { - "displayName" : "Times New Roman", - "value" : "'Times New Roman', serif" - }, - { - "displayName" : "Georgia", - "value" : "'Georgia', serif" - }, - { - "displayName" : "Garamond", - "value" : "'Garamond', serif" - }, - { - "displayName" : "Courier New", - "value" : "'Courier New', monospaced" - }, - { - "displayName" : "Brush Script MT", - "value" : "'Brush Script MT', cursive" - } - ] - } - }, - "xlimit_tick_size": { - "displayName": "Tick Font Size", - "type": { - "enumeration" : [ - { - "displayName" : "Smallest", - "value" : "xx-small" - }, - { - "displayName" : "Very Small", - "value" : "x-small" - }, - { - "displayName" : "Small", - "value" : "small" - }, - { - "displayName" : "Medium", - "value" : "medium" - }, - { - "displayName" : "Large", - "value" : "large" - }, - { - "displayName" : "Very Large", - "value" : "x-large" - }, - { - "displayName" : "Largest", - "value" : "xx-large" - } - ] - } - }, - "xlimit_tick_colour":{ - "displayName": "Tick Font Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "xlimit_tick_rotation": { - "displayName": "Tick Rotation (Degrees)", - "type": { - "numeric": true - } - }, - "xlimit_tick_count": { - "displayName": "Maximum Ticks", - "type": { - "numeric": true - } - }, - "xlimit_label": { - "displayName": "Label", - "type": { - "text": true - } - }, - "xlimit_label_font": { - "displayName": "Label Font", - "type": { - "enumeration" : [ - { - "displayName" : "Arial", - "value" : "'Arial', sans-serif" - }, - { - "displayName" : "Verdana", - "value" : "'Verdana', sans-serif" - }, - { - "displayName" : "Tahoma", - "value" : "'Tahoma', sans-serif" - }, - { - "displayName" : "Trebuchet MS", - "value" : "'Trebuchet MS', sans-serif" - }, - { - "displayName" : "Times New Roman", - "value" : "'Times New Roman', serif" - }, - { - "displayName" : "Georgia", - "value" : "'Georgia', serif" - }, - { - "displayName" : "Garamond", - "value" : "'Garamond', serif" - }, - { - "displayName" : "Courier New", - "value" : "'Courier New', monospaced" - }, - { - "displayName" : "Brush Script MT", - "value" : "'Brush Script MT', cursive" - } - ] - } - }, - "xlimit_label_size": { - "displayName": "Label Font Size", - "type": { - "enumeration" : [ - { - "displayName" : "Smallest", - "value" : "xx-small" - }, - { - "displayName" : "Very Small", - "value" : "x-small" - }, - { - "displayName" : "Small", - "value" : "small" - }, - { - "displayName" : "Medium", - "value" : "medium" - }, - { - "displayName" : "Large", - "value" : "large" - }, - { - "displayName" : "Very Large", - "value" : "x-large" - }, - { - "displayName" : "Largest", - "value" : "xx-large" - } - ] - } - }, - "xlimit_label_colour":{ - "displayName": "Label Font Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "xlimit_l": { - "displayName": "Lower Limit", - "type": { - "numeric": true - } - }, - "xlimit_u": { - "displayName": "Upper Limit", - "type": { - "numeric": true - } - } - } - }, - "y_axis": { - "displayName": "Y-Axis Settings", - "properties": { - "ylimit_colour":{ - "displayName": "Axis Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "ylimit_ticks": { - "displayName": "Draw Ticks", - "type" : { "bool" : true } - }, - "ylimit_sig_figs": { - "displayName": "Tick Decimal Places", - "type": { "numeric": true } - }, - "ylimit_tick_font": { - "displayName": "Tick Font", - "type": { - "enumeration" : [ - { - "displayName" : "Arial", - "value" : "'Arial', sans-serif" - }, - { - "displayName" : "Verdana", - "value" : "'Verdana', sans-serif" - }, - { - "displayName" : "Tahoma", - "value" : "'Tahoma', sans-serif" - }, - { - "displayName" : "Trebuchet MS", - "value" : "'Trebuchet MS', sans-serif" - }, - { - "displayName" : "Times New Roman", - "value" : "'Times New Roman', serif" - }, - { - "displayName" : "Georgia", - "value" : "'Georgia', serif" - }, - { - "displayName" : "Garamond", - "value" : "'Garamond', serif" - }, - { - "displayName" : "Courier New", - "value" : "'Courier New', monospaced" - }, - { - "displayName" : "Brush Script MT", - "value" : "'Brush Script MT', cursive" - } - ] - } - }, - "ylimit_tick_size": { - "displayName": "Tick Font Size", - "type": { - "enumeration" : [ - { - "displayName" : "Smallest", - "value" : "xx-small" - }, - { - "displayName" : "Very Small", - "value" : "x-small" - }, - { - "displayName" : "Small", - "value" : "small" - }, - { - "displayName" : "Medium", - "value" : "medium" - }, - { - "displayName" : "Large", - "value" : "large" - }, - { - "displayName" : "Very Large", - "value" : "x-large" - }, - { - "displayName" : "Largest", - "value" : "xx-large" - } - ] - } - }, - "ylimit_tick_colour":{ - "displayName": "Tick Font Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "ylimit_tick_rotation": { - "displayName": "Tick Rotation (Degrees)", - "type": { - "numeric": true - } - }, - "ylimit_tick_count": { - "displayName": "Maximum Ticks", - "type": { - "numeric": true - } - }, - "ylimit_label": { - "displayName": "Label", - "type": { - "text": true - } - }, - "ylimit_label_font": { - "displayName": "Label Font", - "type": { - "enumeration" : [ - { - "displayName" : "Arial", - "value" : "'Arial', sans-serif" - }, - { - "displayName" : "Verdana", - "value" : "'Verdana', sans-serif" - }, - { - "displayName" : "Tahoma", - "value" : "'Tahoma', sans-serif" - }, - { - "displayName" : "Trebuchet MS", - "value" : "'Trebuchet MS', sans-serif" - }, - { - "displayName" : "Times New Roman", - "value" : "'Times New Roman', serif" - }, - { - "displayName" : "Georgia", - "value" : "'Georgia', serif" - }, - { - "displayName" : "Garamond", - "value" : "'Garamond', serif" - }, - { - "displayName" : "Courier New", - "value" : "'Courier New', monospaced" - }, - { - "displayName" : "Brush Script MT", - "value" : "'Brush Script MT', cursive" - } - ] - } - }, - "ylimit_label_size": { - "displayName": "Label Font Size", - "type": { - "enumeration" : [ - { - "displayName" : "Smallest", - "value" : "xx-small" - }, - { - "displayName" : "Very Small", - "value" : "x-small" - }, - { - "displayName" : "Small", - "value" : "small" - }, - { - "displayName" : "Medium", - "value" : "medium" - }, - { - "displayName" : "Large", - "value" : "large" - }, - { - "displayName" : "Very Large", - "value" : "x-large" - }, - { - "displayName" : "Largest", - "value" : "xx-large" - } - ] - } - }, - "ylimit_label_colour":{ - "displayName": "Label Font Colour", - "type": { - "fill": { - "solid": { - "color": true - } - } - } - }, - "limit_multiplier": { - "displayName": "Axis Scaling Factor", - "type": { - "numeric": true - } - }, - "ylimit_l": { - "displayName": "Lower Limit", - "type": { - "numeric": true - } - }, - "ylimit_u": { - "displayName": "Upper Limit", - "type": { - "numeric": true - } - } - } + { + "displayName" : "Dotted", + "value" : "2 5" + } + ] + } + }, + "colour_99":{ + "displayName": "99.8% Line Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "colour_95":{ + "displayName": "95% Line Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "colour_main":{ + "displayName": "Main Line Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "colour_target":{ + "displayName": "Target Line Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "colour_alt_target":{ + "displayName": "Alt. Target Line Colour", + "type": { "fill": { "solid": { "color": true } } } } + } }, - "dataViewMappings": [ - { - "conditions": [ - { - "key": { "max": 5 }, - "numerators": { "max": 1 }, - "denominators": { "max": 1 }, - "xbar_sds": { "max": 1 } - } - ], - "categorical": { - "categories": { - "for": { "in": "key" }, - "dataReductionAlgorithm": { - "window": { - "count": 30000 - } - } - }, - "values": { - "select": [ - { "bind": { "to": "numerators" } }, - { "bind": { "to": "denominators" } }, - { "bind": { "to": "xbar_sds" } } - ] - } - } + "x_axis": { + "displayName": "X-Axis Settings", + "properties": { + "xlimit_colour":{ + "displayName": "Axis Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "xlimit_ticks": { + "displayName": "Draw Ticks", + "type" : { "bool" : true } + }, + "xlimit_tick_font": { + "displayName": "Tick Font", + "type": { "formatting": { "fontFamily": true } } + }, + "xlimit_tick_size": { + "displayName": "Tick Font Size", + "type": { "formatting": { "fontSize": true } } + }, + "xlimit_tick_colour":{ + "displayName": "Tick Font Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "xlimit_tick_rotation": { + "displayName": "Tick Rotation (Degrees)", + "type": { "numeric": true } + }, + "xlimit_tick_count": { + "displayName": "Maximum Ticks", + "type": { "numeric": true } + }, + "xlimit_label": { + "displayName": "Label", + "type": { "text": true } + }, + "xlimit_label_font": { + "displayName": "Label Font", + "type": { "formatting": { "fontFamily": true } } + }, + "xlimit_label_size": { + "displayName": "Label Font Size", + "type": { "formatting": { "fontSize": true } } + }, + "xlimit_label_colour":{ + "displayName": "Label Font Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "xlimit_l": { + "displayName": "Lower Limit", + "type": { "numeric": true } + }, + "xlimit_u": { + "displayName": "Upper Limit", + "type": { "numeric": true } + } + } + }, + "y_axis": { + "displayName": "Y-Axis Settings", + "properties": { + "ylimit_colour":{ + "displayName": "Axis Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "ylimit_ticks": { + "displayName": "Draw Ticks", + "type" : { "bool" : true } + }, + "ylimit_sig_figs": { + "displayName": "Tick Decimal Places", + "type": { "numeric": true } + }, + "ylimit_tick_font": { + "displayName": "Tick Font", + "type": { "formatting": { "fontFamily": true } } + }, + "ylimit_tick_size": { + "displayName": "Tick Font Size", + "type": { "formatting": { "fontSize": true } } + }, + "ylimit_tick_colour":{ + "displayName": "Tick Font Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "ylimit_tick_rotation": { + "displayName": "Tick Rotation (Degrees)", + "type": { "numeric": true } + }, + "ylimit_tick_count": { + "displayName": "Maximum Ticks", + "type": { "numeric": true } + }, + "ylimit_label": { + "displayName": "Label", + "type": { "text": true } + }, + "ylimit_label_font": { + "displayName": "Label Font", + "type": { "formatting": { "fontFamily": true } } + }, + "ylimit_label_size": { + "displayName": "Label Font Size", + "type": { "formatting": { "fontSize": true } } + }, + "ylimit_label_colour":{ + "displayName": "Label Font Colour", + "type": { "fill": { "solid": { "color": true } } } + }, + "limit_multiplier": { + "displayName": "Axis Scaling Factor", + "type": { "numeric": true } + }, + "ylimit_l": { + "displayName": "Lower Limit", + "type": { "numeric": true } + }, + "ylimit_u": { + "displayName": "Upper Limit", + "type": { "numeric": true } } - ] + } + } + }, + "dataViewMappings": [{ + "conditions": [{ + "key": { "max": 5 }, + "numerators": { "max": 1 }, + "denominators": { "max": 1 }, + "xbar_sds": { "max": 1 } + }], + "categorical": { + "categories": { + "for": { "in": "key" }, + "dataReductionAlgorithm": { "window": { "count": 30000 } } + }, + "values": { + "select": [ + { "bind": { "to": "numerators" } }, + { "bind": { "to": "denominators" } }, + { "bind": { "to": "xbar_sds" } } + ] + } + } + }] } diff --git a/package.json b/package.json index 9875973..7a25fe1 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "minimist": "^1.2.7", "powerbi-visuals-api": "~3.6.0", "powerbi-visuals-utils-dataviewutils": "^2.2.1", + "powerbi-visuals-utils-typeutils": "^6.0.1", "regenerator-runtime": "^0.13.11" }, "devDependencies": { diff --git a/pbiviz.json b/pbiviz.json index b0705d9..190ac41 100644 --- a/pbiviz.json +++ b/pbiviz.json @@ -4,7 +4,7 @@ "displayName":"SPC Charts", "guid":"PBISPC", "visualClassName":"Visual", - "version":"1.3.3.1", + "version":"1.3.3.2", "description":"A PowerBI custom visual for SPC charts", "supportUrl":"https://github.com/AUS-DOH-Safety-and-Quality/PowerBI-SPC", "gitHubUrl":"https://github.com/AUS-DOH-Safety-and-Quality/PowerBI-SPC" diff --git a/src/Classes/plotProperties.ts b/src/Classes/plotProperties.ts index bcebdb4..2a1ec6f 100644 --- a/src/Classes/plotProperties.ts +++ b/src/Classes/plotProperties.ts @@ -6,6 +6,7 @@ import plotData from "./plotData" import settingsObject from "./settingsObject"; import dataObject from "./dataObject"; import controlLimits from "./controlLimits"; +import { pixelConverter } from "powerbi-visuals-utils-typeutils"; type axisProperties = { lower: number, @@ -100,42 +101,30 @@ class plotPropertiesClass { const browserFontSize: number = Number(window.getComputedStyle(document.body).getPropertyValue('font-size').match(/\d+/)[0]); const fontScaling: number = browserFontSize / 16; - // Map the default pixel sizes for each text label, based on browser default, and scale - // https://careerkarma.com/blog/css-font-size/ - const fontSizeMap: Record = { - "xx-small" : 9 * fontScaling, - "x-small" : 10 * fontScaling, - "small" : 13 * fontScaling, - "medium" : 16 * fontScaling, - "large" : 18 * fontScaling, - "x-large" : 24 * fontScaling, - "xx-large" : 32 * fontScaling - }; - // Only scale padding for label if a label is actually present - const xLabelSize: string = args.inputSettings.x_axis.xlimit_label_size.value; - const xLabelPadding: number = args.inputSettings.x_axis.xlimit_label.value ? fontSizeMap[xLabelSize] : 0; - const yLabelSize: string = args.inputSettings.y_axis.ylimit_label_size.value; - const yLabelPadding: number = args.inputSettings.y_axis.ylimit_label.value ? fontSizeMap[yLabelSize] : 0; + const xLabelSize: number = args.inputSettings.x_axis.xlimit_label_size.value; + const xLabelPadding: number = args.inputSettings.x_axis.xlimit_label.value ? xLabelSize * fontScaling : 0; + const yLabelSize: number = args.inputSettings.y_axis.ylimit_label_size.value; + const yLabelPadding: number = args.inputSettings.y_axis.ylimit_label.value ? yLabelSize * fontScaling : 0; - const xTickSize: string = args.inputSettings.x_axis.xlimit_tick_size.value; + const xTickSize: number = args.inputSettings.x_axis.xlimit_tick_size.value; - const yTickSize: string = args.inputSettings.y_axis.ylimit_tick_size.value; + const yTickSize: number = args.inputSettings.y_axis.ylimit_tick_size.value; this.xAxis = { lower: xLowerLimit !== null ? xLowerLimit : 0, upper: xUpperLimit, - start_padding: args.inputSettings.canvas.left_padding.value + fontSizeMap[xTickSize] + xLabelPadding, + start_padding: args.inputSettings.canvas.left_padding.value + xTickSize * fontScaling + xLabelPadding, end_padding: args.inputSettings.canvas.right_padding.value, colour: args.inputSettings.x_axis.xlimit_colour.value, ticks: args.inputSettings.x_axis.xlimit_ticks.value, - tick_size: xTickSize, + tick_size: pixelConverter.toString(xTickSize), tick_font: args.inputSettings.x_axis.xlimit_tick_font.value, tick_colour: args.inputSettings.x_axis.xlimit_tick_colour.value, tick_rotation: args.inputSettings.x_axis.xlimit_tick_rotation.value, tick_count: args.inputSettings.x_axis.xlimit_tick_count.value, label: args.inputSettings.x_axis.xlimit_label.value, - label_size: args.inputSettings.x_axis.xlimit_label_size.value, + label_size: pixelConverter.toString(args.inputSettings.x_axis.xlimit_label_size.value), label_font: args.inputSettings.x_axis.xlimit_label_font.value, label_colour: args.inputSettings.x_axis.xlimit_label_colour.value }; @@ -144,16 +133,16 @@ class plotPropertiesClass { lower: yLowerLimit, upper: yUpperLimit, start_padding: args.inputSettings.canvas.upper_padding.value, - end_padding: args.inputSettings.canvas.lower_padding.value + fontSizeMap[yTickSize] + yLabelPadding, + end_padding: args.inputSettings.canvas.lower_padding.value + yTickSize * fontScaling + yLabelPadding, colour: args.inputSettings.y_axis.ylimit_colour.value, ticks: args.inputSettings.y_axis.ylimit_ticks.value, - tick_size: yTickSize, + tick_size: pixelConverter.toString(yTickSize), tick_font: args.inputSettings.y_axis.ylimit_tick_font.value, tick_colour: args.inputSettings.y_axis.ylimit_tick_colour.value, tick_rotation: args.inputSettings.y_axis.ylimit_tick_rotation.value, tick_count: args.inputSettings.y_axis.ylimit_tick_count.value, label: args.inputSettings.y_axis.ylimit_label.value, - label_size: args.inputSettings.y_axis.ylimit_label_size.value, + label_size: pixelConverter.toString(args.inputSettings.y_axis.ylimit_label_size.value), label_font: args.inputSettings.y_axis.ylimit_label_font.value, label_colour: args.inputSettings.y_axis.ylimit_label_colour.value }; diff --git a/src/Classes/settingsGroups.ts b/src/Classes/settingsGroups.ts index 1b206af..17a5252 100644 --- a/src/Classes/settingsGroups.ts +++ b/src/Classes/settingsGroups.ts @@ -125,13 +125,13 @@ class xAxisSettings { xlimit_colour: settingsPair; xlimit_ticks: settingsPair; xlimit_tick_font: settingsPair; - xlimit_tick_size: settingsPair; + xlimit_tick_size: settingsPair; xlimit_tick_colour: settingsPair; xlimit_tick_rotation: settingsPair; xlimit_tick_count: settingsPair; xlimit_label: settingsPair; xlimit_label_font: settingsPair; - xlimit_label_size: settingsPair; + xlimit_label_size: settingsPair; xlimit_label_colour: settingsPair; xlimit_l: settingsPair; xlimit_u: settingsPair; @@ -140,13 +140,13 @@ class xAxisSettings { this.xlimit_colour = new settingsPair("#000000"); this.xlimit_ticks = new settingsPair(true); this.xlimit_tick_font = new settingsPair("'Arial', sans-serif"); - this.xlimit_tick_size = new settingsPair("x-small"); + this.xlimit_tick_size = new settingsPair(10); this.xlimit_tick_colour = new settingsPair("#000000"); this.xlimit_tick_rotation = new settingsPair(-35); this.xlimit_tick_count = new settingsPair(null); this.xlimit_label = new settingsPair(null); this.xlimit_label_font = new settingsPair("'Arial', sans-serif"); - this.xlimit_label_size = new settingsPair("x-small"); + this.xlimit_label_size = new settingsPair(10); this.xlimit_label_colour = new settingsPair("#000000"); this.xlimit_l = new settingsPair(null); this.xlimit_u = new settingsPair(null); @@ -157,13 +157,13 @@ class yAxisSettings { ylimit_colour: settingsPair; ylimit_ticks: settingsPair; ylimit_tick_font: settingsPair; - ylimit_tick_size: settingsPair; + ylimit_tick_size: settingsPair; ylimit_tick_colour: settingsPair; ylimit_tick_rotation: settingsPair; ylimit_tick_count: settingsPair; ylimit_label: settingsPair; ylimit_label_font: settingsPair; - ylimit_label_size: settingsPair; + ylimit_label_size: settingsPair; ylimit_label_colour: settingsPair; limit_multiplier: settingsPair; ylimit_l: settingsPair; @@ -175,13 +175,13 @@ class yAxisSettings { this.ylimit_ticks = new settingsPair(true); this.ylimit_sig_figs = new settingsPair(null); this.ylimit_tick_font = new settingsPair("'Arial', sans-serif"); - this.ylimit_tick_size = new settingsPair("x-small"); + this.ylimit_tick_size = new settingsPair(10); this.ylimit_tick_colour = new settingsPair("#000000"); this.ylimit_tick_rotation = new settingsPair(0); this.ylimit_tick_count = new settingsPair(null); this.ylimit_label = new settingsPair(null); this.ylimit_label_font = new settingsPair("'Arial', sans-serif"); - this.ylimit_label_size = new settingsPair("x-small"); + this.ylimit_label_size = new settingsPair(10); this.ylimit_label_colour = new settingsPair("#000000"); this.limit_multiplier = new settingsPair(1.5); this.ylimit_l = new settingsPair(null);