X-axis action strange - Charts iOS The Next CEO of Stack OverflowIs there a good charting library for iPhone?Scaling Axis in iOS Charts (MPAndroidChart for iOS)iOS Charts - set minimum y axis rangeHow to render only chosen axis labels in ios ChartsiOS Charts - Objective C, not SwiftMultiple labels xAxis iOS-Chartsios-charts combined chart: bars going past right axis of chartiOS Charts: Combined data into stacked bar chart?Formatting bar chart x-axis values, bars, and labelHow to create a custom limit line label in candlestick chart using ios-charts library?

Multiple labels for a single equation

What connection does MS Office have to Netscape Navigator?

Is there an analogue of projective spaces for proper schemes?

How do we know the LHC results are robust?

Which kind of appliances can one connect to electric sockets located in a airplane's toilet?

MessageLevel in QGIS3

Real integral using residue theorem - why doesn't this work?

How to safely derail a train during transit?

Why didn't Khan get resurrected in the Genesis Explosion?

How to count occurrences of text in a file?

How did people program for Consoles with multiple CPUs?

How does the mv command work with external drives?

How did the Bene Gesserit know how to make a Kwisatz Haderach?

Anatomically Correct Strange Women In Ponds Distributing Swords

Elegant way to replace substring in a regex with optional groups in Python?

Is "for causing autism in X" grammatical?

How do I go from 300 unfinished/half written blog posts, to published posts?

How do I avoid eval and parse?

Would a completely good Muggle be able to use a wand?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

What is the result of assigning to std::vector<T>::begin()?

Several mode to write the symbol of a vector

Can you replace a racial trait cantrip when leveling up?

Bold, vivid family



X-axis action strange - Charts iOS



The Next CEO of Stack OverflowIs there a good charting library for iPhone?Scaling Axis in iOS Charts (MPAndroidChart for iOS)iOS Charts - set minimum y axis rangeHow to render only chosen axis labels in ios ChartsiOS Charts - Objective C, not SwiftMultiple labels xAxis iOS-Chartsios-charts combined chart: bars going past right axis of chartiOS Charts: Combined data into stacked bar chart?Formatting bar chart x-axis values, bars, and labelHow to create a custom limit line label in candlestick chart using ios-charts library?










0















I'm using the Charts library on iOS, but I'm having troubles with one of my charts in my TableView. The X-axis looks strange, and I loose resolution in my data. Here is how it currently looks:



enter image description here



My data is typically between 900 and 1100.



I configured the chart like this:



let dataSet = LineChartDataSet(values: entries, label: "")
dataSet.drawCirclesEnabled = false
dataSet.lineWidth = 2
dataSet.mode = .horizontalBezier
dataSet.colors = UIColor.gray
dataSet.drawValuesEnabled = false

let lineChartData = LineChartData(dataSets: [dataSet])
self.chartEntries.append(lineChartData)


Any ideas on why my X-axis looks like this? My others charts look fine and dandy.










share|improve this question
























  • Can you show me your data or where r u assigning those data in chart ?

    – CodeChanger
    Mar 12 at 8:49















0















I'm using the Charts library on iOS, but I'm having troubles with one of my charts in my TableView. The X-axis looks strange, and I loose resolution in my data. Here is how it currently looks:



enter image description here



My data is typically between 900 and 1100.



I configured the chart like this:



let dataSet = LineChartDataSet(values: entries, label: "")
dataSet.drawCirclesEnabled = false
dataSet.lineWidth = 2
dataSet.mode = .horizontalBezier
dataSet.colors = UIColor.gray
dataSet.drawValuesEnabled = false

let lineChartData = LineChartData(dataSets: [dataSet])
self.chartEntries.append(lineChartData)


Any ideas on why my X-axis looks like this? My others charts look fine and dandy.










share|improve this question
























  • Can you show me your data or where r u assigning those data in chart ?

    – CodeChanger
    Mar 12 at 8:49













0












0








0








I'm using the Charts library on iOS, but I'm having troubles with one of my charts in my TableView. The X-axis looks strange, and I loose resolution in my data. Here is how it currently looks:



enter image description here



My data is typically between 900 and 1100.



I configured the chart like this:



let dataSet = LineChartDataSet(values: entries, label: "")
dataSet.drawCirclesEnabled = false
dataSet.lineWidth = 2
dataSet.mode = .horizontalBezier
dataSet.colors = UIColor.gray
dataSet.drawValuesEnabled = false

let lineChartData = LineChartData(dataSets: [dataSet])
self.chartEntries.append(lineChartData)


Any ideas on why my X-axis looks like this? My others charts look fine and dandy.










share|improve this question
















I'm using the Charts library on iOS, but I'm having troubles with one of my charts in my TableView. The X-axis looks strange, and I loose resolution in my data. Here is how it currently looks:



enter image description here



My data is typically between 900 and 1100.



I configured the chart like this:



let dataSet = LineChartDataSet(values: entries, label: "")
dataSet.drawCirclesEnabled = false
dataSet.lineWidth = 2
dataSet.mode = .horizontalBezier
dataSet.colors = UIColor.gray
dataSet.drawValuesEnabled = false

let lineChartData = LineChartData(dataSets: [dataSet])
self.chartEntries.append(lineChartData)


Any ideas on why my X-axis looks like this? My others charts look fine and dandy.







ios swift charts tableview ios-charts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 12 at 7:44









MetaSnarf

4,16611332




4,16611332










asked Mar 8 at 14:27









RecusiweRecusiwe

20111437




20111437












  • Can you show me your data or where r u assigning those data in chart ?

    – CodeChanger
    Mar 12 at 8:49

















  • Can you show me your data or where r u assigning those data in chart ?

    – CodeChanger
    Mar 12 at 8:49
















Can you show me your data or where r u assigning those data in chart ?

– CodeChanger
Mar 12 at 8:49





Can you show me your data or where r u assigning those data in chart ?

– CodeChanger
Mar 12 at 8:49












1 Answer
1






active

oldest

votes


















0














The chart looks fine, since it's trying to squeeze your data that's around value 1000 into a very small space. If you have a look at the MPAndroidChart lib wiki, you can see that you can adjust the min and max range per axis, so you can effectively zoom in closer to your values to better see the distribution:




setAxisMaximum(float max): Set a custom maximum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.



setAxisMinimum(float min): Set a custom minimum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.




It would look something like:



graph.yAxis.axisMinimum = 900
graph.yAxis.axisMaximum = 1100





share|improve this answer























  • Oh right. So I can just set the max to the highest datapoint + a constant, and min for the lowest datapoint + a constant to get the right zoom?

    – Recusiwe
    Mar 8 at 18:17











  • Oh, I can see I use a CombinedChart, and I dont seem to be able to access the axis' in the same manner?

    – Recusiwe
    Mar 8 at 18:40











  • I don't see why. Use a lineChart instead since you don't have any combined data.

    – Adis
    Mar 9 at 13:56











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55065216%2fx-axis-action-strange-charts-ios%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














The chart looks fine, since it's trying to squeeze your data that's around value 1000 into a very small space. If you have a look at the MPAndroidChart lib wiki, you can see that you can adjust the min and max range per axis, so you can effectively zoom in closer to your values to better see the distribution:




setAxisMaximum(float max): Set a custom maximum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.



setAxisMinimum(float min): Set a custom minimum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.




It would look something like:



graph.yAxis.axisMinimum = 900
graph.yAxis.axisMaximum = 1100





share|improve this answer























  • Oh right. So I can just set the max to the highest datapoint + a constant, and min for the lowest datapoint + a constant to get the right zoom?

    – Recusiwe
    Mar 8 at 18:17











  • Oh, I can see I use a CombinedChart, and I dont seem to be able to access the axis' in the same manner?

    – Recusiwe
    Mar 8 at 18:40











  • I don't see why. Use a lineChart instead since you don't have any combined data.

    – Adis
    Mar 9 at 13:56















0














The chart looks fine, since it's trying to squeeze your data that's around value 1000 into a very small space. If you have a look at the MPAndroidChart lib wiki, you can see that you can adjust the min and max range per axis, so you can effectively zoom in closer to your values to better see the distribution:




setAxisMaximum(float max): Set a custom maximum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.



setAxisMinimum(float min): Set a custom minimum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.




It would look something like:



graph.yAxis.axisMinimum = 900
graph.yAxis.axisMaximum = 1100





share|improve this answer























  • Oh right. So I can just set the max to the highest datapoint + a constant, and min for the lowest datapoint + a constant to get the right zoom?

    – Recusiwe
    Mar 8 at 18:17











  • Oh, I can see I use a CombinedChart, and I dont seem to be able to access the axis' in the same manner?

    – Recusiwe
    Mar 8 at 18:40











  • I don't see why. Use a lineChart instead since you don't have any combined data.

    – Adis
    Mar 9 at 13:56













0












0








0







The chart looks fine, since it's trying to squeeze your data that's around value 1000 into a very small space. If you have a look at the MPAndroidChart lib wiki, you can see that you can adjust the min and max range per axis, so you can effectively zoom in closer to your values to better see the distribution:




setAxisMaximum(float max): Set a custom maximum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.



setAxisMinimum(float min): Set a custom minimum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.




It would look something like:



graph.yAxis.axisMinimum = 900
graph.yAxis.axisMaximum = 1100





share|improve this answer













The chart looks fine, since it's trying to squeeze your data that's around value 1000 into a very small space. If you have a look at the MPAndroidChart lib wiki, you can see that you can adjust the min and max range per axis, so you can effectively zoom in closer to your values to better see the distribution:




setAxisMaximum(float max): Set a custom maximum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.



setAxisMinimum(float min): Set a custom minimum value for this axis.
If set, this value will not be calculated automatically depending on
the provided data.




It would look something like:



graph.yAxis.axisMinimum = 900
graph.yAxis.axisMaximum = 1100






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 8 at 15:20









AdisAdis

2,58522130




2,58522130












  • Oh right. So I can just set the max to the highest datapoint + a constant, and min for the lowest datapoint + a constant to get the right zoom?

    – Recusiwe
    Mar 8 at 18:17











  • Oh, I can see I use a CombinedChart, and I dont seem to be able to access the axis' in the same manner?

    – Recusiwe
    Mar 8 at 18:40











  • I don't see why. Use a lineChart instead since you don't have any combined data.

    – Adis
    Mar 9 at 13:56

















  • Oh right. So I can just set the max to the highest datapoint + a constant, and min for the lowest datapoint + a constant to get the right zoom?

    – Recusiwe
    Mar 8 at 18:17











  • Oh, I can see I use a CombinedChart, and I dont seem to be able to access the axis' in the same manner?

    – Recusiwe
    Mar 8 at 18:40











  • I don't see why. Use a lineChart instead since you don't have any combined data.

    – Adis
    Mar 9 at 13:56
















Oh right. So I can just set the max to the highest datapoint + a constant, and min for the lowest datapoint + a constant to get the right zoom?

– Recusiwe
Mar 8 at 18:17





Oh right. So I can just set the max to the highest datapoint + a constant, and min for the lowest datapoint + a constant to get the right zoom?

– Recusiwe
Mar 8 at 18:17













Oh, I can see I use a CombinedChart, and I dont seem to be able to access the axis' in the same manner?

– Recusiwe
Mar 8 at 18:40





Oh, I can see I use a CombinedChart, and I dont seem to be able to access the axis' in the same manner?

– Recusiwe
Mar 8 at 18:40













I don't see why. Use a lineChart instead since you don't have any combined data.

– Adis
Mar 9 at 13:56





I don't see why. Use a lineChart instead since you don't have any combined data.

– Adis
Mar 9 at 13:56



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55065216%2fx-axis-action-strange-charts-ios%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived