我有一个使用 ng2-charts 模块的 chart.js 图表。该图表在 y 轴上显示百分比,在 x 轴上显示时间。是否可以根据数据将 y 轴设置为显示 0 到 100 而不是动态范围?
我已经开发了一个有角度的网站,并在proxy.conf.js文件中有以下代理设置.
const proxyConfig = [
{
context: '/web/api/webclients/**',
target: 'https://10.109.102.109',
changeOrigin: true,
secure: false
},
{
context: '/restful/**',
target: 'https://10.109.110.190',
changeOrigin: true,
secure: false
},
{
context: '/api/**',
target: 'http://10.109.105.107',
changeOrigin: true,
secure: false
}
];
Run Code Online (Sandbox Code Playgroud)
在开发模式下,proxy.conf.js按预期工作.
我在package.json文件中有这些用于启动和构建.
"build": "ng build --aot --prod",
"start": "ng serve --proxy-config proxy.conf.js -o",
Run Code Online (Sandbox Code Playgroud)
运行"npm run build"并使用生成的文件在IIS 8上托管网站后,需要使用代理设置的页面不起作用.
例如,我的请求https:// localhost/web/api/webclients/authentication应该转到https://10.109.102.109/web/api/webclients/authentication
如果我在Windows服务器上托管此网站,如何在IIS中设置这些代理设置?如果我在非Windows服务器上托管它,如何设置这些代理设置?