Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在有两个View的情况下使用Slider #1567

Open
North9498 opened this issue Nov 2, 2024 · 0 comments
Open

如何在有两个View的情况下使用Slider #1567

North9498 opened this issue Nov 2, 2024 · 0 comments

Comments

@North9498
Copy link

North9498 commented Nov 2, 2024

BizCharts Version:4.1.23
Platform:macos
Mini Showcase(like screenshots):
forck and create a demo: https://bizcharts.net/product/BizCharts4/demo/306

<Card title={title} className={${className}}>
<Chart
padding={[10, 20, 10, 20]}
data={data}
height={"58.9vh"}
scale={scale}
autoFit
>

            <Axis name="time"/>
            <Axis name="current"/>
            <Axis name="spectrum" position="right"/>

            <View data={data}>
                <Area
                    position="time*current"
                    color="l(100) 0:#1890ff 1:#e6f4ff"
                    shape="smooth"
                    style={{fillOpacity: 0.85}}
                />
            </View>

            <View data={data}>
                <Coord reflect="y"/>
                <Area
                    position="time*spectrum"
                    color="l(100) 0:#646cff 1:#f9f0ff"
                    shape="smooth"
                    style={{fillOpacity: 0.5}}
                />
            </View>

            <Slider start={0} end={0.5} padding={[10, 10, -30, 10]}/>
        </Chart>

报错
console.js:288 TypeError: Cannot read properties of undefined (reading 'field') at bizcharts.js?v=ff1cf79e:36112:41 at Array.map (<anonymous>) at Slider2.getData (bizcharts.js?v=ff1cf79e:36111:31) at Slider2.getSliderCfg (bizcharts.js?v=ff1cf79e:36087:34) at Slider2.render (bizcharts.js?v=ff1cf79e:35987:33) at View2.initComponents (bizcharts.js?v=ff1cf79e:46029:34) at View2.renderPaddingRecursive (bizcharts.js?v=ff1cf79e:45762:24) at View2.paint (bizcharts.js?v=ff1cf79e:45722:24) at View2.render (bizcharts.js?v=ff1cf79e:45217:24) at ChartHelper.render (bizcharts.js?v=ff1cf79e:59432:34)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant