react-native-charts-wrapper icon indicating copy to clipboard operation
react-native-charts-wrapper copied to clipboard

How to set xAxis width, margin or padding

Open EternalChildren opened this issue 5 years ago • 7 comments

how can i set config of xAxis to get the effect of expected. can u help me?? @wuxudong

Expected Behavior

image

Actual Behavior

image

Data and config

         yAxis={{
                left: { enabled: false },
                right: {
                  enabled: true,
                  drawAxisLine: false,
                  drawGridLines: true,
                  textColor: processColor(color.black_989898),
                  textSize: 12 * screen.pxDp,
                  gridColor: processColor(color.black_F2F2F2),
                  gridLineWidth: 1 * screen.pxDp,
                  labelCount: 4,
                  labelCountForce: true,
                  valueFormatter: "###0.00%",
                  ...(Platform.OS === "ios"
                    ? { spaceTop: 0.1, spaceBottom: 0.1 }
                    : {})
                }
              }}
              xAxis={{
                enabled: true,
                position: "BOTTOM",
                drawAxisLine: false,
                drawGridLines: false,
                labelCount: 3,
                labelCountForce: true,
                textColor: processColor(color.black_989898),
                textSize: 12 * screen.pxDp,
                valueFormatter: "date",
                granularityEnabled: true,
                granularity: 1,
                // centerAxisLabels: true,
                avoidFirstLastClipping: true,
                valueFormatterPattern: "YYYY-MM-dd",
                yOffset: 6 * screen.pxDp
              }}
              viewPortOffsets={
                Platform.OS === "ios"
                  ? {
                      top: 8 * screen.pxDp,
                      right: 54 * screen.pxDp,
                      bottom: 21 * screen.pxDp,
                      left: 0
                    }
                  : undefined
              }

Specifications

  • Version: 0.5.0
  • Platform: pic in ios, hope the same effect in android

EternalChildren avatar Apr 12 '19 09:04 EternalChildren

Any help on this ?

SamiChab avatar Dec 07 '20 13:12 SamiChab

any help ??

phanhuy111 avatar Jan 07 '21 09:01 phanhuy111

@EternalChildren any solution?

aysenurtaskomur avatar Jun 23 '21 08:06 aysenurtaskomur

Also wondering if anyone ever found a solution

llaver avatar Nov 11 '21 01:11 llaver

anyone??

marcosnovaesq avatar Jan 10 '22 16:01 marcosnovaesq

any solution @marcosnovaesq @llaver @EternalChildren @SamiChab ?

christopher-18 avatar Nov 12 '22 13:11 christopher-18

I think it is solved by adding the hidden line in the end of actual line.

hidden0302 avatar Jun 26 '23 06:06 hidden0302