目前正在使用Highcharts from npm,并且我使用expose-loader和脚本加载器以下列方式配置highcharts-rounded-corners。
圆角插件是一个希望存在全局Highcharts对象的iife。因此,我使用expose-loader公开它,然后使用script-loader执行脚本。
虽然这种方法有效但我想知道是否有比这更好的解决方案?
//Configure Highcharts
require("expose-loader?Highcharts!highcharts");
require("script-loader!../../vendor/highcharts/plugins/rounded-corners-master/rounded-corners.min.js");
答案 0 :(得分:0)
尝试要求像这样的高级图表
try {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectDiskReads().detectDiskWrites().detectNetwork().penaltyLog().build());
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo propertyInfo = new PropertyInfo();
propertyInfo.setName("City");
propertyInfo.setValue(model.getCity());
propertyInfo.setType(Integer.class);
propertyInfo.setName("Username");
propertyInfo.setValue(model.getLetter());
propertyInfo.setType(String.class);
propertyInfo.setName("SerialType");
propertyInfo.setValue(model.getSeri());
propertyInfo.setType(Integer.class);
propertyInfo.setName("Serial");
propertyInfo.setValue(model.getSerial());
propertyInfo.setType(Integer.class);
propertyInfo.setName("Date");
propertyInfo.setValue(model.getDate());
propertyInfo.setType(String.class);
request.addProperty(propertyInfo);
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER12);
envelope.setOutputSoapObject(request);
envelope.dotNet = true;
HttpTransportSE httpTransportSE = new HttpTransportSE(URL);
httpTransportSE.debug = true;
httpTransportSE.call(SOAP_ACTION, envelope);
SoapObject response = (SoapObject) envelope.bodyIn;
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
String responsesuccess = response.toString();
// SoapObject response = (SoapObject) envelope.getResponse();
Log.i(TAG, "getSoapResponse: " + responsesuccess);
//soapCallback.onCallback(response.toString());
} catch (Exception e) {
Log.e(TAG, "getSoapResponse: " + e.getMessage(), e);
soapCallback.onCallback(e.getMessage());
// e.printStackTrace();
}