Victory-native: Can't set chart full width screen

Created on 23 Jul 2018  路  2Comments  路  Source: FormidableLabs/victory-native

Bugs and Questions

Checklist

  • [* ] This is a victory-native specific issue. (Issues that _also_ appear in victory should be opened here)

  • [ *] I have read through the FAQ and Guides before asking a question

  • [ *] I am using the latest version of victory-native

  • [* ] I have checked to make sure that my versions of react-native and react-native-svg are compatible with this version of victory-native. Read about version requirements

  • [* ] I've searched open issues to make sure I'm not opening a duplicate issue

The Problem

I'm using victory-native to draw candles chart but I can't set the chart full width screen. I set width for both VictoryChart and VictoryAxis but nothing change.
My environment:
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-svg": "^6.4.1",
"victory-native": "^0.18.2"

Here my code:

<View style={{borderWidth: 2, borderColor: '#c43a31'}}>
        <VictoryChart
          theme={VictoryTheme.material}
          domainPadding={{x: 20}}
          scale={{x: 'time'}}
          width={Dimensions.get ('window').width - 10}
          height={250}
        >
          <VictoryAxis
            tickFormat={t => `${t.getDate ()}/${t.getMonth ()}`}
            width={600}
            height={200}
          />
          <VictoryAxis
            dependentAxis
            offsetX={Dimensions.get ('window').width - 10}
            width={600}
            height={600}
          />
          <VictoryCandlestick
            candleColors={{positive: '#05e742', negative: '#c43a31'}}
            data={sampleDataDates}
          />
        </VictoryChart>
      </View>

Here is screen:
image

Please help me, thank you!

Most helpful comment

Set padding={0}

All 2 comments

Set padding={0}

Ok, thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aszheng picture aszheng  路  5Comments

udfalkso picture udfalkso  路  4Comments

matejkriz picture matejkriz  路  3Comments

WhyX picture WhyX  路  6Comments

phunkren picture phunkren  路  5Comments