删除Android的HighCharts边框

删除Android的HighCharts边框,android,highcharts,Android,Highcharts,我正在尝试在android webview中加载highchart js,它工作正常 我的webview是线性布局,我希望两个布局的背景颜色相同。但在我的图表周围有一个不受欢迎的白色边框,我无法删除 我在js文件中设置了图表背景色,在xml文件中设置了linearlayout背景色。 我尝试将webview设置为橙色背景色,但看不到它。 我还尝试更改图表的bordercolor和bordersize属性,但问题仍然存在。 我不知道现在该怎么办 我的布局如下: <LinearLayout x

我正在尝试在android webview中加载highchart js,它工作正常

我的webview是线性布局,我希望两个布局的背景颜色相同。但在我的图表周围有一个不受欢迎的白色边框,我无法删除

我在js文件中设置了图表背景色,在xml文件中设置了linearlayout背景色。 我尝试将webview设置为橙色背景色,但看不到它。 我还尝试更改图表的bordercolor和bordersize属性,但问题仍然存在。 我不知道现在该怎么办

我的布局如下:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="#d6d7d4"
tools:context=".MainActivity" >

<WebView
    android:id="@+id/chartView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@android:color/holo_orange_dark"/>

<ListView 
    android:id="@+id/alarmList"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
$(document).ready(function() {
var chart1 = new Highcharts.Chart({
    chart: {
        renderTo: 'container',
        backgroundColor: '#d6d7d4',

        zoomType: 'x'
    },
    xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: {
            year: '%Y'
        }
    },
    yAxis: {
        title: {
            text: 'MW'
        },
        max: 500, 
        plotBands: [{
            from: 0,
            to: 100,
            color: 'rgba(247, 247, 247, 0.3)'
        }, { 
            from: 100,
            to: 200,
            color: 'rgba(215, 216, 212, 0.3)'
        }, { // Light breeze
            from: 200,
            to: 300,
            color: 'rgba(247, 247, 247, 0.3)'
        }, { // Light breeze
            from: 300,
            to: 400,
            color: 'rgba(215, 216, 212, 0.3)'
        },{
            from: 400,
            to: 500,
            color: 'rgba(247, 247, 247, 0.3)'
        }]
    },
    title: {
        text: ''
    },
    subtitle: {
        text: ''
    },
    tooltip: {
        formatter: function() {
            return '<b>'+ this.series.name +'</b><br/>'+
            Highcharts.dateFormat('%Y', this.x) +': '+ this.y +' %';
        },
        valueDecimals: 1,
        valueSuffix: ' %'
    },
    series: 
    [{
        data: [[Date.UTC(2005, 1, 1),0],
            [Date.UTC(2008, 1, 1),10],
            [Date.UTC(2008, 1, 1),20],
            [Date.UTC(2010, 10, 1),30],
            [Date.UTC(2010, 10, 1),40],
            [Date.UTC(2013, 7, 1),50],
            [Date.UTC(2013, 7, 1),80]],
        type: 'line',
        color: "#504AA9"
    }]
});

我的js是这样的:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="#d6d7d4"
tools:context=".MainActivity" >

<WebView
    android:id="@+id/chartView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@android:color/holo_orange_dark"/>

<ListView 
    android:id="@+id/alarmList"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
$(document).ready(function() {
var chart1 = new Highcharts.Chart({
    chart: {
        renderTo: 'container',
        backgroundColor: '#d6d7d4',

        zoomType: 'x'
    },
    xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: {
            year: '%Y'
        }
    },
    yAxis: {
        title: {
            text: 'MW'
        },
        max: 500, 
        plotBands: [{
            from: 0,
            to: 100,
            color: 'rgba(247, 247, 247, 0.3)'
        }, { 
            from: 100,
            to: 200,
            color: 'rgba(215, 216, 212, 0.3)'
        }, { // Light breeze
            from: 200,
            to: 300,
            color: 'rgba(247, 247, 247, 0.3)'
        }, { // Light breeze
            from: 300,
            to: 400,
            color: 'rgba(215, 216, 212, 0.3)'
        },{
            from: 400,
            to: 500,
            color: 'rgba(247, 247, 247, 0.3)'
        }]
    },
    title: {
        text: ''
    },
    subtitle: {
        text: ''
    },
    tooltip: {
        formatter: function() {
            return '<b>'+ this.series.name +'</b><br/>'+
            Highcharts.dateFormat('%Y', this.x) +': '+ this.y +' %';
        },
        valueDecimals: 1,
        valueSuffix: ' %'
    },
    series: 
    [{
        data: [[Date.UTC(2005, 1, 1),0],
            [Date.UTC(2008, 1, 1),10],
            [Date.UTC(2008, 1, 1),20],
            [Date.UTC(2010, 10, 1),30],
            [Date.UTC(2010, 10, 1),40],
            [Date.UTC(2013, 7, 1),50],
            [Date.UTC(2013, 7, 1),80]],
        type: 'line',
        color: "#504AA9"
    }]
});
$(文档).ready(函数(){
var chart1=新的高点图表。图表({
图表:{
renderTo:'容器',
背景颜色:“#d6d7d4”,
zoomType:'x'
},
xAxis:{
键入:“日期时间”,
日期时间标签格式:{
年份:'%Y'
}
},
亚克斯:{
标题:{
文字:“MW”
},
最高:500,
绘图带:[{
起:0,,
致:100,,
颜色:“rgba(2472470.3)”
}, { 
起:100,,
致:200,,
颜色:“rgba(215216212,0.3)”
},{//微风
起:200,
至:300,
颜色:“rgba(2472470.3)”
},{//微风
起:300,,
至:400,
颜色:“rgba(215216212,0.3)”
},{
从:400,
至:500,
颜色:“rgba(2472470.3)”
}]
},
标题:{
文本:“”
},
副标题:{
文本:“”
},
工具提示:{
格式化程序:函数(){
返回“+this.series.name+”
+ Highcharts.dateFormat(“%Y”,this.x)+':“+this.Y+%”; }, 数值小数:1, 值后缀:'' }, 系列: [{ 数据:[[Date.UTC(2005,1,1),0], [UTC日期(2008年1月1日),10], [UTC日期(2008年1月1日),20], [UTC日期(2010年10月1日),30], [UTC日期(2010年10月1日),40], [UTC日期(2013年7月1日),50], [UTC日期(2013年7月1日),80]], 键入:“行”, 颜色:“504AA9” }] });
}))

还有我的android屏幕截图:


设置网页的背景可能会消除它



如果不是这样,那一定是你的网络视图让这个寄宿者知道了一些方法。

设置网页的背景可能会消除它



如果不是这样的话,那一定是你的网络视图让那个寄宿生知道了些什么。

就是这样!谢谢,兰特,就这样!谢谢,瑞安