You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/PxWeb2/documentation/customization.md
+112-4Lines changed: 112 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,14 @@ Replace the font files in the `fonts` directory. Keep file names.
229
229
230
230
Make sure you have the proper license to self-host fonts.
231
231
232
+
### Change logo and favicon
233
+
To change the logo/favicon in PxWeb replace svgs in the image folder. The names must be the same.
234
+
235
+
For image replace `images/logo.svg` with your own logo.
236
+
Replace `images/favicon.ico` / `images/favicon-darkmode.svg` with your own favicon.
237
+
238
+
The svg **must** include viewbox and width/height attributes for it to be rendered correctly.
239
+
232
240
### Adjust or fix text / translations
233
241
234
242
Edit the relevant `locales/<lang>/translation.json`.
@@ -248,6 +256,69 @@ Keys reflect where in the UI a string is used. Only modify values.
248
256
}
249
257
```
250
258
259
+
### Change date format in translation file
260
+
261
+
Edit the relevant `locales/<lang>/translation.json` file.
262
+
We have two date formats defined under `date` in translation files - `simple_date` and `simple_date_with_time`.
263
+
264
+
Change the format options as needed. **PxWeb2** uses `Intl.DateTimeFormat` for date formatting. See documentation for options here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
265
+
266
+
Here is an examples configuration used for english and norwegian:
-`simple_number_with_zero_decimal`: Number formatting with no decimal places.
306
+
-`simple_number_with_one_decimal`: Number formatting with one decimal place.
307
+
-`simple_number_with_two_decimals`: Number formatting with two decimal places.
308
+
309
+
The group and decimal separators are determined by the language locale. However, if you want to customize the number formatting further, you can add additional options to the `pxNumber` formatter.
310
+
311
+
To override decimal add `decimalSeparator` to the `number_format` object. Likewise, to override group separator add `thousandSeparator` to the `number_format` object.
312
+
313
+
If you need to add space as a group separator, you add the value `nbsp` for non-breaking space or `nnbsp` for narrow non-breaking space, e.g. `thousandSeparator: 'nbsp'`.
314
+
315
+
Here is an example of how to override both decimal and group separators for simple_number_with_two_decimals. Use `,` as decimal separator and non-breaking space as group separator:
"text": "This is an optional section that can be used for content that may be useful for some users, but is not essential for everyone. Key information that all users need to see should always appear in the lead paragraph."
the “no results” message when no tables match the search or filters.
380
488
When `enabled` is `true`, each string in the `helpText` array is shown
381
489
as a separate list item under a help heading.
382
490
383
491
-**footer**
384
-
One or more footer columns with `header` and list of `links`.
492
+
One or more footer columns with `header` and list of `links`. If links have `external` set to `true`, they automatically will have the icon for external links and will open in a new tab. See example above.
385
493
386
494
This setup allows administrators to adjust localized content (text and links)
387
495
for each language without modifying the application code.
This instruction guides you in how to install PxWeb 2.0 on IIS.
3
+
This instruction guides you in how to install PxWeb 2 on IIS.
4
4
5
5
## Prerequisites
6
6
7
7
- A supported Windows server with IIS installed.
8
-
- ApiUrl to your PxWebapi2 installation.
8
+
- The [URL Rewrite module](https://www.iis.net/downloads/microsoft/url-rewrite) must be installed on your IIS.
9
+
- ApiUrl to your PxWebApi 2 installation.
9
10
If your tables endpoint is at `https://your.api.server/PxWeb/api/v2/tables`
10
11
then your ApiUrl is `https://your.api.server/PxWeb/api/v2` (omit a trailing slash, one is added automatically)
11
12
@@ -14,23 +15,53 @@ This instruction guides you in how to install PxWeb 2.0 on IIS.
14
15
1. Download the [zip file for the latest release](https://github.com/pxtools/PxWeb2/releases/latest) from GitHub.
15
16
It is found inside the Asserts heading.
16
17
Make sure to _Unblock_ it if its block by right clicking on it in _File Explorer_ and check the `Unblock` checkbox.
17
-
1. Put the contents of the zip file to the location of your choice. E.g `C:\inetpub\wwwroot\pxweb2`.
18
-
1. Adjust `baseApplicationPath` and `apiUrl` in `config\config.js`:
18
+
2. Put the contents of the zip file to the location of your choice. E.g `C:\inetpub\wwwroot\pxweb2`.
19
+
3. Adjust `baseApplicationPath` and `apiUrl` in `config\config.js`:
19
20
20
21
```js
21
22
baseApplicationPath:"/pxweb2/"
22
23
23
24
apiUrl:"your api url"
24
25
```
25
26
26
-
1. In `index.html`, adjust the `<base>` tag:
27
+
4. In `index.html`, adjust the `<base>` tag:
27
28
28
29
```html
29
30
<base href="/pxweb2/">
30
31
```
31
32
32
-
1.I didnt need this: Ensure the web server rewrites (if needed) static file requests correctly to that subpath.
33
+
5. In `web.config`, adjust the `Content-Security-Policy` to allow calls to your PxWebApi 2installation. Withinthe `Content-Security-Policy` replace the text `https://enter-your-api-domain-here`with the domain of your PxWebApi (for example https://api.scb.se):
33
34
34
-
1. In IIS find the folder and convert it to application. ( Concider using a separate Application pool for this :-) )
1. In IIS find the folder and convert it to an application. (Consider using a separate Application pool forthis)
35
40
36
41
1. Open "http(s)://"server adress"/pxweb2 .
42
+
43
+
## Troubleshooting
44
+
45
+
### Problem running PxWeb on localhost
46
+
47
+
If you are trying to run PxWeb directly on the server under localhost you might get an error looking like this in the console of your browser:
48
+
49
+
```
50
+
Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
51
+
```
52
+
53
+
#### Solution
54
+
55
+
Change localhost in the URL to the computer name of the server.
56
+
57
+
### PxWeb refuses to connect to PxWebApi
58
+
59
+
If you get an error message looking like this in the console of your browser:
60
+
61
+
```
62
+
Refused to connect to 'https://your-api-url' because it violates the following Content Security Policy directive: "connect-src 'self' https://enter-your-api-domain-here".
63
+
```
64
+
65
+
#### Solution
66
+
67
+
You need to enter the domain of your PxWebApi in the Content Security Policy section in web.config, see step 5 of the installation steps above.
Copy file name to clipboardExpand all lines: docs/PxWeb2/project/Solution.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# PxWeb solution
2
-
In this project, we have made some choices about how we will work in the project across two countries, in order to create opportunities for other countries to contribute in the long term with both development and user testing of PxWeb 2.0. In addition, we have made some choices to find the best solution for installing PxWeb. All this to reach the main goal to create a user-friendly PxWeb.
2
+
In the project, we have made some choices about how we will work in the project across two countries, in order to create opportunities for other countries to contribute in the long term with both development and user testing of PxWeb 2.0. In addition, we have made some choices to find the best solution for installing PxWeb. All this to reach the main goal to create a user-friendly PxWeb.
3
3
## WCAG and Search Engine Optimization (SEO)
4
4
- The new interface will follow the rules for A and AA in [WCAG 2.1](https://www.w3.org/TR/WCAG21/)
5
5
- SEO is the use of methods that achieve better visibility or "ranking" on search engines result page.
@@ -15,7 +15,7 @@ It will be possible to change
15
15
- corner radius of the elements in the interface.
16
16
## Open source at GitHub
17
17
The new interface will be able do install directly from GitHub. Also documentation will be found here.
18
-
[PxTools at GitHub](https://github.com/pxtools)
18
+
[PxTools at GitHub](https://www.pxtools.net/documentation/overview/)
19
19
## Usertest
20
20
We are following the UX design process in this project.
The user interface in PxWeb can no longer be further developed effectively due to technological limitations, while the users needs and expectations are constantly changing. Statistics Sweden and Statistics Norway will therefore together create a new user interface based on PxWebApi 2.0
4
-
5
-
## New user interface for PxWeb
6
-
- PxWebApi 2.0 Beta was released i March
7
-
- The API gives us the opportunity to make a new user interface for PxWeb on a new technical platform
8
-
- The project is a cooperation between Statistics Sweden and Statistics Norway
9
-
10
-
## Two project goals
11
-
- The project will work on a new userfriendly interface based on PxWebApi 2.0 during 2024 - 2025 with the launch of the first test-version in mid-2024
12
-
13
-
- The project will test and establish good and sustained collaboration processes between SCB and SSB at both operational level and management level in the further development of PX-tools
14
-
15
-
3
+
PxWeb is an application for disseminating statistics in dynamic tables from an SQL or file-based database on the web. The user interface in the current version of PxWeb could no longer be effectively developed due to technological limitations, and users needs and expectations are constantly changing so Statistics Sweden and Statistics Norway jointly initiated a project in January 2024. The aim of the project was to create a new user interface based on PxWebApi 2 and was released in its first version in October 2025.
4
+
## Two goals of the Project (January 2024 - October 2025)
5
+
The project had two goals
6
+
- A new user-friendly interface for PxWeb based on PxWebApi 2
7
+
- Test and establish effective and sustainable collaboration processes between Statistics Sweden, SCB and Statistics Norway, SSB at both operational level and management level in the further development of PX-tools
16
8
## Organization
17
-
18
9
### Steering group
19
-
The steering group consists of managers at Communication and IT in SCB and SSB.
20
-
10
+
The steering group consist of managers at Communication and IT in SCB and SSB.
21
11
### Project team
22
-
The team has participants from both Statistics Sweden and Statistics Norway.
12
+
The team had participants from both Statistics Sweden and Statistics Norway.
23
13
The team is set up with
24
14
- Project leader
25
15
- Scrum master
26
16
- Architects
27
-
-Designer (UX and UI)
17
+
-UX/UI Designer
28
18
- Developers
29
19
- Specialists
30
-
-Tech lead
20
+
-Technical lead
31
21
- Test leader
32
22
- Testers
33
-
34
-
### Cooperation
35
-
The other Nordic countries will be involved in tessting and participate at the demos.
Copy file name to clipboardExpand all lines: docs/PxWeb2/project/plans.md
+27-17Lines changed: 27 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,40 @@
1
1
# Plans
2
2
3
-
The project launched two test versions in June and December 2024 and from then and on the new interface of PxWeb 2.0 is updated every third Monday after the demo.
4
-
The goal is to deliver a version of PxWeb 2.0 based on PxWebApi 2.0 during September 2025.
5
-
6
-
## PxWebApi 2.0 Release end of August 2025
7
-
- Follows JSON-stat2 format
8
-
- Save to file
9
-
- Saved query
10
-
- Pivot
3
+
## Remaining to develop 2025
4
+
- Show PxWebApi 2 in PxWeb
5
+
- Button to improve table layout
6
+
- Freeze table head
7
+
- Improve search at start page (search for content in tables)
8
+
- Search in beginning of words in variable list
9
+
- Hide empty rows from table
10
+
- Chose to show code or text
11
+
- Manual pivoting
12
+
- Possibility for text and links in Help
13
+
- Possibility for own link in logo
14
+
- WCAG-fixes
15
+
- Saved query as alternative to the algorithm (documentation)
16
+
17
+
## Remaining to develop after 2025 in PxWeb 2
18
+
- Graph
19
+
- Hierarchy
20
+
- Sort order
21
+
- Sum
22
+
- more...
11
23
12
-
## PxWeb 2.0 Release end of September 2025
24
+
## PxWeb 2 Release October 2025
13
25
- Startpage
14
26
- Save to file
15
27
- Saved query
16
28
- URL and breadcrumb
17
-
- Saved queary as alternative to the algorithm
18
29
- Pivoting
19
30
- Head and footer
20
-
- Show PxWebApi 2.0
21
31
22
-
## Remaining to develop after September 2025 in PxWeb 2.0
0 commit comments