Matthew-Weber / ReutersCharter

0 stars 0 forks source link

Annotation instructions #6

Closed basilesimon closed 5 years ago

basilesimon commented 5 years ago

Right now chartblock.js instructs:

import { annotations } from './annotations';

annotations:annotations,

Should we include an example of annotations.js?

Would have helped at least @fcage and I in the last two days :)

basilesimon commented 5 years ago

Suggestion:

{annotationDebug:false,
            annotations:function(self){
                if (!self){self = this};
                return [                
                    {
                      note: {
                        label: "Ha!",
                        wrap: 120,
                            dyOffset:1.1,               
                      },
                      connector: {
                            end: "arrow",
                      },
                      data:{date:"08/01/2018”,value:2},
                      dy: -30,
                      dx: 0
                    },
                    {
                      note: {
                        label: "Hahaha!",
                        wrap: 150,
                dyOffset:1.2,               
                      },
                      connector: {
                        end: "arrow", type: "curve", points:[[-35,5]]
                      },
                      data:{category:”France",value:4},
                      dy: 40,
                      dx: -35
                    },

                    ]
                }
}
Matthew-Weber commented 5 years ago

There is an extensive example annotation.js file included in the generator, that should be in the scripts folder already for every project. Are you suggesting I also put one in the ReutersCharter folder? (can do, just checking for clarity.)

basilesimon commented 5 years ago

Oh. I had not seen this file. Makes sense now, and sounds fine for me too. Happy to close this issue.