Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New symbol - simple help #7

Closed
cptolemy opened this issue Jul 24, 2018 · 5 comments
Closed

New symbol - simple help #7

cptolemy opened this issue Jul 24, 2018 · 5 comments

Comments

@cptolemy
Copy link

Greatings

I'm creating a new simbol for the chart library. Can you please tell me in which units should I create it (px, mm, or etc.), with what size, and in which program (CorelDraw, Inkscape,etc) so they can be compatible to your own?

Kind regards

CPtolemy

@Kibo
Copy link
Owner

Kibo commented Jul 25, 2018

Hi
there are some symbols in:
https://github.com/Kibo/AstroChart/tree/master/assets

I used Inscape for edit.

See for example:
https://github.com/Kibo/AstroChart/blob/master/project/src/svg.js#L293

You have to center the symbol. You can use calibration fot it:
https://github.com/Kibo/AstroChart/tree/master/project/examples/debug

Regards

@cptolemy
Copy link
Author

Hi

Thanks for the reply. Those are good examples. Can you just please tell me, in Inkspace, if you were to create another symbol, in pixels let's say, would you use as origin (0,0) and what would be the width and height of the object - in pixels (or mm..)?

I've created a sample symbol, but it's either too big or goes out of the place.

My problem is actually there in Inkspace.

Sorry for the trouble.

Kind regards

@Kibo
Copy link
Owner

Kibo commented Jul 25, 2018

Hi

there is XML editor in Inkscape. You can see and edit SVG markup in it.
The size of symbol you need estimate according to other symbol.

Sometimes there is scale wraper (or atribute) in SVG markup in Inkscape. You have to remove it, to see the real size of symbol.

Regards

@Kibo
Copy link
Owner

Kibo commented Jul 25, 2018

The origin of symbol set as you need in Inkscape. Then you align in code:

For example
https://github.com/Kibo/AstroChart/blob/master/project/src/svg.js#L416

// center symbol
var xShift = -5; //px						
var yShift = -7; //px	

@cptolemy
Copy link
Author

Hi Kibo

Thanks for the help :) Take care.

Kind regards

Ptolemy

@Kibo Kibo closed this as completed Sep 20, 2018
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

No branches or pull requests

2 participants