嵌套的JSON对象:JSON内部引用声明

问题描述 投票:-1回答:1

我想只更新每个json对象中的一个字段,例如:from“chartScrollbar我想仅更新backgroundAlpha,而仅使用chartcursor只更新cursorAlpha,尽管在同一个json文件中使用第三个对象。我们可以在同一个json中访问其他对象值

config: {
                "type": "serial",
                "theme": "light",
                "glueToTheEnd": true,
                "marginRight": 40,
                "marginLeft": 40,
                "autoMarginOffset": 20,
                "mouseWheelZoomEnabled": true,

                "chartScrollbar": {
                    "graph": "g1",
                    "oppositeAxis": false,
                    "offset": 30,
                    "scrollbarHeight": 80,
                    "backgroundAlpha": 0,
                    "selectedBackgroundAlpha": 0.1,
                    "selectedBackgroundColor": "#888888",
                    "graphFillAlpha": 0,
                    "graphLineAlpha": 0.5,
                    "selectedGraphFillAlpha": 0,
                    "selectedGraphLineAlpha": 1,
                    "autoGridCount": true,
                    "color": "#AAAAAA"
                },
                "chartCursor": {
                    "pan": true,
                    "valueLineEnabled": true,
                    "valueLineBalloonEnabled": true,
                    "cursorAlpha": 1,
                    "cursorColor": "#258cbb",
                    "limitToGraph": "g1",
                    "valueLineAlpha": 0.2,
                    "valueZoomable": true
                },

            }
json
1个回答
0
投票
You can try in this way :
"arrows": [{
                    "alpha": 1,
                    "innerRadius": "35%",
                    "nailRadius": 0,
                    "radius": "170%"
                }],
                "data": []
            },
            Config:{
                        "axes" : "config.axes.endValue"
            }
© www.soinside.com 2019 - 2024. All rights reserved.