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

Axis Dependecy does not work on ios #224

Closed
ghost opened this issue Feb 28, 2018 · 2 comments
Closed

Axis Dependecy does not work on ios #224

ghost opened this issue Feb 28, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 28, 2018

Hello,

I have a CombinedChart that shows up just fine in my Android Project but does not display properly on ios.
Android:
image

ios :
image

Here is my attached code for my constructor :
constructor() {
super();
this.state = {
isLoading: true,

  xAxis: {
    valueFormatter: hourEndingJson,
    granularityEnabled: true,
    granularity: 1,
    drawGridLines: false
  },
  yAxis: {
    left: {
      valueFormatter: hourEndingJson,
      granularityEnabled: true,
      granularity: 10
    },
    right: {
      granularityEnabled: true,
      granularity: 100
    }
  },

  marker: {
    enabled: true,
    markerColor: processColor("#dfd608"),
    textColor: processColor("white"),
    markerFontSize: 14
  }
};
this.getData = this.getData.bind(this);

}

and where I set the chart data:
this.setState(
{
isLoading: false,

        data: {
          lineData: {
            dataSets: [
              {
                values: loadMwJson,
                label: "Load Mw",

                config: {
                  drawValues: false,
                  colors: [processColor("green")],
                  mode: "CUBIC_BEZIER",
                  drawCircles: false,
                  lineWidth: 2,
                  axisDependency: "left"
                }
              },
              {
                values: totalLMPJson,
                label: "Total LMP",

                config: {
                  drawValues: false,
                  colors: [processColor("blue")],
                  mode: "CUBIC_BEZIER",
                  drawCircles: false,
                  lineWidth: 2,
                  axisDependency: "right"
                }
              },
              {
                values: incOpenJson,
                label: "Inc Open",

                config: {
                  drawValues: false,
                  colors: [processColor("orange")],
                  mode: "CUBIC_BEZIER",
                  drawCircles: false,
                  lineWidth: 2,
                  axisDependency: "right"
                }
              },
              {
                values: decOpenJson,
                label: "Dec Open",

                config: {
                  drawValues: false,
                  colors: [processColor("purple")],
                  // mode: "CUBIC_BEZIER",
                  drawCircles: false,
                  lineWidth: 2,
                  axisDependency: "right"
                }
              }
            ]
          },

          candleData: {
            dataSets: [
              {
                values: incCandleData,
                label: "Inc Avg",

                config: {
                  drawValues: false,
                  axisDependency: "right",

                  highlightColor: processColor("darkgray"),

                  shadowColor: processColor("black"),
                  shadowWidth: 2,
                  shadowColorSameAsCandle: true,
                  increasingColor: processColor("orange"),
                  increasingPaintStyle: "fill"
                }
              },
              {
                values: decCandleData,
                label: "Dec Avg",

                config: {
                  drawValues: false,
                  axisDependency: "right",

                  highlightColor: processColor("darkgray"),

                  shadowColor: processColor("black"),
                  shadowWidth: 2,
                  shadowColorSameAsCandle: true,
                  increasingColor: processColor("blue"),
                  increasingPaintStyle: "fill"
                }
              }
            ]
          },

I set all of the graphs to use the right side y axis except for the first line graph; I'm not sure why the behavior is different on ios and what I can do to make them similar. I thinsk it has to do with axis dependency not working properly on ios? (When I zoom into the ios chart, I can see my other graphs that are displayed properly in the Android version).

If you have seen this issue could you steer me in the right direction? I'm not sure how to resolve this problem.

Thanks,

@wuxudong
Copy link
Owner

wuxudong commented Mar 2, 2018

I reproduced the problem, and I found it works well in another branch upgrade_to_charts_3.0.5

You can try this branch manually (It requires swift 4), but notice this branch is not released yet, and Charts 3.0.5 has some other bugs. and the legend -> position property is replaced.

@wuxudong
Copy link
Owner

wuxudong commented Mar 2, 2018

This is screenshot for master branch.

simulator screen shot - iphone 8 - 2018-03-02 at 09 50 39

and this is screenshot in branch upgrade_to_charts_3.0.5 with same code.

simulator screen shot - iphone 8 - 2018-03-02 at 09 19 00

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