Skip to content

Custom xAxis, e.g., horizontal, line drawing has been implemented #584

Open
zahangirbd wants to merge 328 commits into
chart-kit:masterfrom
zahangirbd:master
Open

Custom xAxis, e.g., horizontal, line drawing has been implemented #584
zahangirbd wants to merge 328 commits into
chart-kit:masterfrom
zahangirbd:master

Conversation

@zahangirbd

@zahangirbd zahangirbd commented Feb 16, 2022

Copy link
Copy Markdown

Custom xAxis, e.g., horizontal, line drawing has been implemented using following variables.

withCustomXAxis
customXAxisData

Following feature has been implemented here.
#582

Sample implementation:

const customXAxisData = {
        datasets: [
          {
            pts: 10,
            lineStyle: {
              stroke: Colors.brownGrey,
              strokeWidth: 2,
              strokeDasharray: '2, 4',
            },
          },
          {
            pts: 45.00,
            lineStyle: {
              stroke: Colors.appBlue,
              strokeWidth: 2,
            },
          },
        ],
      };
<LineChart
          data={data}
          width={screenWidth}
          height={240}
          chartConfig={chartConfig}
          withShadow={false}
          withInnerLines={false}
          yAxisInterval={10}
          withVerticalLines={false}
          withCustomXAxis
          customXAxisData={customXAxisData}
          style={{marginLeft: -16, marginTop: 16, marginRight: 16}}
          segments={5}
        />

Once it is merged, I shall add vertical line drawing part using the same architecture.

k-yokoishi and others added 30 commits March 31, 2019 10:13
* Updated README.md

* Add StackedBar Factor

Added a factor to correct Vertical Labels

* Create stackedbar-chart

* Add StackedBarChart to index.js

* Add StackedBarChart to README.md

* Added stackedBar Var

* Resolve Conflicts

* Inverted Legend

Inverted Legend that it fit to the StackedBar order.

* Improve Y Value

* Try to repair the wrong Tab size

The first commit has a wrong Tab Size

* Correct Label position when Stack is to small

* fix lint errors, add example into the app
When the data is negative value in BarChart,
the corresponding bar is rendered to downward from 0.
* Draw BarChart and LineChart from 0

* Add prop `fromZero`

Add prop `fromZero` to BarChart and LineChart to
render the charts from 0 not from the minimum value.
* update app.json to have sdkVersion

if sdkVersion is not present, expo will use the latest version installed on the computer vs the one from package.json

* update line-chart.js to fix onPress handler logic

* change larger click circle to not rely on the fill to have opacity
* remove Circles from View that were making them not show up in iOS
* Hide Horizontal and Vertical Labels

* improve docs
* Add labels to progress chart

* Refactoring to make this a non-breaking change
…hart-kit#141)

* fix: update paths-js library version to fix pie chart with empty values

* fix: fix NaN labels on pie charts with empty values
Please look into this and approve as I was not able to proceed or I will have to change the plugin thanks
* added background opacity props

* updated README: added new opacity options 'backgroundGradientFromOpacity' and 'backgroundGradientToOpacity'.
evgenusov and others added 24 commits December 23, 2020 12:48
Co-authored-by: Herman Starikov <Hermanstarikov@gmail.com>
Co-authored-by: Herman Starikov <Hermanstarikov@gmail.com>
Co-authored-by: Robert <robertogarciadevelopment@gmail.com>
…ment for options” (chart-kit#523)

To fix React Native Error: “Animated.event now requires a second argument for options”
…chart-kit#515)

* Rework X axis labeling to allow dissimilar dataset lengths

* Add prepare script for GitHub sourced library usage (builds on install)
* feat(line-chart): add fillShadowGradient To and From

* feat(line-chart): set fillShadowGradientToOpacity

* feat(line-chart): maintain backwards compatibility

* feat(readme): update chart style object docs

* feat(abstract): update option comments

* feat(abstract): add offset options

* feat(readme): update documentation

* feat(readme): update documentation

* feat(package): specify dependency resolutions

* feat(abstract-chart): fix backwards compatibility

Co-authored-by: Ezra Burga <ezra.burga@deepwatch.com>
@geneshairzan

Copy link
Copy Markdown

ist implemented in master ?

@ghost ghost force-pushed the master branch 3 times, most recently from bc0b8af to 096eeb0 Compare June 19, 2026 04:43
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

Successfully merging this pull request may close these issues.