react-native-chart-kit icon indicating copy to clipboard operation
react-native-chart-kit copied to clipboard

Apply custom styles to legend and pie chart

Open pessimisticat opened this issue 6 years ago • 7 comments

Is there a way to apply custom styles to legend and pie chart? I want to move legend to the left. How can I do that?

pessimisticat avatar Nov 06 '19 07:11 pessimisticat

I'll start working on this one

felipecruz91 avatar Apr 17 '20 18:04 felipecruz91

@Hermanya I'd like to start working on this issue but after following the contributing guideline I got this error message:

C:\src\react-native-chart-kit>yarn start
yarn run v1.22.4
$ expo start
Starting project at C:\src\react-native-chart-kit
Expo DevTools is running at http://localhost:19002
Press d to open DevTools now, or shift-d to always open it automatically.
error Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class

debug SyntaxError: Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class
    at new RegExp (<anonymous>)
    at blacklist (C:\src\react-native-chart-kit\node_modules\metro-config\src\defaults\blacklist.js:34:10)
    at getBlacklistRE (C:\src\react-native-chart-kit\node_modules\@react-native-community\cli\build\tools\loadMetroConfig.js:61:59)
    at getDefaultConfig (C:\src\react-native-chart-kit\node_modules\@react-native-community\cli\build\tools\loadMetroConfig.js:75:20)
    at load (C:\src\react-native-chart-kit\node_modules\@react-native-community\cli\build\tools\loadMetroConfig.js:103:25)
    at Object.runServer [as func] (C:\src\react-native-chart-kit\node_modules\@react-native-community\cli\build\commands\server\runServer.js:72:58)
    at C:\src\react-native-chart-kit\node_modules\@react-native-community\cli\build\cliEntry.js:152:22
Metro Bundler process exited with code 1
Error: Metro Bundler process exited with code 1
    at ChildProcess.<anonymous> (C:\@expo\[email protected]\src\Project.ts:1854:16)
    at Object.onceWrapper (events.js:418:26)
    at ChildProcess.emit (events.js:311:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

(I've switched the values of main and _main in the package.json before running yarn start as you can see in the image below):

image

felipecruz91 avatar Apr 19 '20 07:04 felipecruz91

Looks like it's related to this issue https://github.com/facebook/metro/issues/453

Hermanya avatar Apr 19 '20 15:04 Hermanya

Thanks for a nice chart and simple enough that we could get it up and running fast. I'm also looking for an option to move pie chart legend to the left, too. It'll be more flexible :)

PirunSeng avatar Sep 10 '20 05:09 PirunSeng

@Hermanya Hey any update on this feature?

sidVaidya avatar Jul 09 '21 04:07 sidVaidya

Would love that too

YoelAbk6 avatar Jun 05 '22 10:06 YoelAbk6

Require custom styling for legend.

renishdeveloper avatar Apr 10 '24 13:04 renishdeveloper