pavelkuligin / chart

Create the most popular types of charts by real or random data
MIT License
1.18k stars 63 forks source link

v3.0 - Can't Generate Charts #18

Closed ckizer closed 6 years ago

ckizer commented 6 years ago

It doesn't work in sketch for me.

Screen recording: http://kzr.me/0E0p3N29071X/Screen%20Recording%202018-05-04%20at%2012.00%20PM.gif

pavelkuligin commented 6 years ago

@ckizer Can you send me GIF by email? Your link is broken for me.

chris-barklem commented 6 years ago

It is broken for me also (v3). I select a rectangle > plugins > select the chart type and it draws a chart without asking for data.

pavelkuligin commented 6 years ago

@chris-barklem Chart is a smart plugin :-) If you have numbers in Pasteboard chart will draw them. If you want to draw chart by Random numbers, you can "cmd + C" on rectangle and then run plugin.

chris-barklem commented 6 years ago

Thanks @pavelkuligin, I have cleared the clipboard and use the method suggested. When creating a chart with Random data: 7 categories and 24 items (eg) it creates 7 areas with the same data.

pavelkuligin commented 6 years ago

@chris-barklem image

7 categories (lines) 24 items (points by x)

chris-barklem commented 6 years ago

@pavelkuligin thanks for the reply, I get the same for line chart but nothing for stream graph (also was attempting stacked columns ...). I am trying to display % of 24 hours

`12 6 5 7 9 10 3 0 0 2 1 34 3 12 10 19 7 8 4 0 0 12 15 11

15 0 1 2 3 7 9 10 18 15 13 11 7 0 0 3 4 7 9 7 0 24 0 20

6 2 4 8 10 6 18 10 12 19 12 23 1 8 12 9 0 0 23 1 4 10 34 4

23 23 29 34 23 12 14 19 23 31 19 11 23 21 14 23 31 28 21 32 43 6 18 20

28 54 23 15 27 40 38 28 32 12 23 11 40 37 42 26 18 16 8 28 13 14 13 13

7 6 27 26 5 7 7 7 8 12 13 7 8 10 22 17 6 16 0 20 10 23 20 9

9 9 11 8 23 18 11 26 7 9 19 3 18 12 0 3 34 25 35 12 30 11 0 23`

pavelkuligin commented 6 years ago

Really strange... It works fine with 6 categories and less: image

I will investigate it.

chris-barklem commented 6 years ago

Thanks @pavelkuligin really appreciate the feedback, I thought I might have been doing something wrong :)

ckizer commented 6 years ago

Here is the screen recording: http://kzr.me/0E0p3N29071X

Wait I have to supply data? Shouldn't the default behavior be to just work? It seems odd that I would have to know the secret shortcut first?

ckizer commented 6 years ago

screen recording 2018-05-04 at 12 00 pm

pavelkuligin commented 6 years ago

@chris-barklem your issue has been fixed in Chart 3.1, just update plugin. You can use this Sheet to validate: https://docs.google.com/spreadsheets/d/1zmhLc1mPWOsxkfFquVKKjq-fyqoYZlecEA1g66n8wRg/edit?usp=sharing

pavelkuligin commented 6 years ago

@ckizer Really strange things happened :-) What is your version of Sketch?

chris-barklem commented 6 years ago

Hi @pavelkuligin, I checked the validation for version 3.1 and all is working perfectly. Thanks for your quick update on the plugin.

chris-barklem commented 6 years ago

Hi @pavelkuligin, two questions (not issues).

Is there a way to configure the colors, the margin between columns etc.? Is there a workflow (in your opinion) to convert charts designed in sketch over to d3?

Best regards :)

pavelkuligin commented 6 years ago

@chris-barklem

  1. Plugins > Chart > Set params. For colors use following format: [R,G,B], [R,G,B]... Number of colors will define number of possible categories. Margin between bars will be added soon.
  2. There is no way for now.
jsl15c commented 6 years ago

@pavelkuligin This plugin does not work for me. Most recent update of Sketch. Following steps in "random data" section of documentation. test

gespinha commented 6 years ago

Isn't working here too. When I fill in the configuration form and click "Ok", nothing happens. On the Chart Panel only some buttons work as well.

Sketch v50 with Chart v3.1.0

sneaknz commented 6 years ago

Same for me after updating to Sketch v50 and running Chart v3.1.0 — It has worked really well for me in the past though, great plugin! Hopefully it's an easy fix to get running again.

pavelkuligin commented 6 years ago

@jsl15c @gespinha @sneaknz The problem is lack of compatibility between Sketch 49.3 and 50. Therefore you can roll back to the previous version of Sketch or wait for Chart 3.2, but without any ETAs.

pavelkuligin commented 6 years ago

All bugs fixed in Chart 3.2

gespinha commented 6 years ago

@pavelkuligin Thanks for the quick fix. Unfortunately, it still doesn't work and the same behaviour persists.

The Mac Console shows these messages when I click on any button in the Chart Panel:

Exception: *** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray

and

*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray

Any clues on what might be causing this?

dpinna13 commented 6 years ago

@pavelkuligin Updated to Chart 3.2.0 and I'm still on Sketch v49.3 - this is what I found in the console while trying to generate a stacked area chart.

Exception: TypeError: MSPath.pathWithBezierPath is not a function. (In 'MSPath.pathWithBezierPath(area)', 'MSPath.pathWithBezierPath' is undefined)

TypeError: MSPath.pathWithBezierPath is not a function. (In 'MSPath.pathWithBezierPath(area)', 'MSPath.pathWithBezierPath' is undefined) line: 661 sourceURL: /Users/Diego/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Chart.sketchplugin/Contents/Sketch/stackedareachart.js column: 45

Does this help?

Thanks

pavelkuligin commented 6 years ago

@gespinha This error means that you didn't select any Rectangle to draw chart. @dpinna13 Please, update your Sketch to v. 50. I will add version checker later.

gespinha commented 6 years ago

@pavelkuligin Thanks, it all works now!

Is there any chance you will be adding error messages any time soon?

pavelkuligin commented 6 years ago

@gespinha Yep, I'm working on it ;-)

gespinha commented 6 years ago

Great!

sneaknz commented 6 years ago

@pavelkuligin Working great for me now too, thanks for the quick fix!

jsl15c commented 6 years ago

@pavelkuligin Incredible! Thank you for the bug fix! Does sketch have decent documentation for writing custom plugins?

pavelkuligin commented 6 years ago

@jsl15c Only documentation with a few simple use cases :-) https://developer.sketchapp.com/reference/api/ https://github.com/turbobabr/Sketch-Plugins-Cookbook