I am using ios-charts ( https://github.com/danielgindi/Charts ). I have a LineChartView with 12 x-axis values. This, however, is too much to see at the same time, so I want to display only 5, and then let the user drag to the right to see the next one.
I tried this:
let chart = LineChartView() chart.dragEnabled = true chart.setVisibleXRangeMaximum(5) let xAxis = chart.xAxis xAxis.axisMinValue = 0 xAxis.axisMaxValue = 5.0 xAxis.setLabelsToSkip(0)
But still see all 11 values at a time. How can I see only 5?
I finally got it!
Correct answer:
chart.setVisibleXRangeMaximum(5)
However, for this it is necessary to install after , the data was installed on the diagram (and not in the setting earlier)
labelCount X . objc,
_chartView.xAxis.labelCount = 5;
Source: https://habr.com/ru/post/1655083/More articles:IOS10 WkWebView URL Decoding Error - iosКак настроить или изменить диалог дефрагментации по умолчанию на перекрестке? - javascriptHow to add image attributes to Quill editor? I want to add the attribute 'alt' and 'title' - htmlIs it possible to cache IEnumerable lazy evaluation results? - c #why spring jdbcTemplate batchUpdate insert row by row - javaHow to include class and property descriptions in Swashbuckle generated Swagger documents for WebApi 2 with OWIN? - asp.net-web-apiOverview of DNS Requirements for Google App Engine Applications - google-app-engineSpark: PySpark + Cassandra query performance - cassandraAndroid: check if the file is a valid SQLite database - androidHow to mix angular2 components into an existing requirejs trunk project? - angularAll Articles